integrate (x-2) / (x+1)^2 +4 dx

As written, it's pretty easy, since

Letting u=x+1, that is just
(u-3)/u^2 + 4 = 1/u - 3/u^2 + 4
If, however, you want the integral of
(x-2) / ((x+1)^2 +4)
that is just a bit trickier, but not much
Again with u=x+1, that becomes
(u-3)/(u^2+4) = u/(u^2+4) - 3/(u^2+4)
Those are things you can handle easily, right?
v = u^2+4 and the first part is just 1/2 dv/v
the 2nd part is a standard form for arctan(u/2)