Let #f(x)=(x-1)/(x+2)#
The domain of #f(x)# is #D_f(x)=RR-{-2} #
To solve the inequality, let's do a sign chart
#color(white)(aaaa)##x##color(white)(aaaa)##-oo##color(white)(aaaa)##-2##color(white)(aaaa)##1##color(white)(aaaa)##+oo#
#color(white)(aaaa)##x+2##color(white)(aaaa)##-##color(white)(aaa)##∣∣##color(white)(a)##+##color(white)(aaaa)##+#
#color(white)(aaaa)##x-1##color(white)(aaaa)##-##color(white)(aaa)##∣∣##color(white)(a)##-##color(white)(aaaa)##+#
#color(white)(aaaa)##f(x)##color(white)(aaaaa)##+##color(white)(aaa)##∣∣##color(white)(a)##-##color(white)(aaaa)##+#
#f(x)<0# when #x in ] -2,1 [ #
graph{(x-1)/(x+2) [-12.66, 12.65, -6.33, 6.33]}