Answer:
y = (1/3)(e^(-9(x+2)/(x+1)) -1)
Explanation:
You want the particular solution to the differential equation ...
y' = 3(1+3y)/(1+x)^2 with y(-2) = 0
Separation of variables
The differential equation can be rewritten as ...

We can define u = 1+3y, then du = 3 and the left side becomes ...
dy/(3(1+3y)) = (1/9)du/u
and its integral is ...
∫(1/9)du/u = (1/9)ln(u) = (1/9)ln(1 +3y)
The integral of the right side is ...

Result
Then the result of integrating both sides of this rewritten differential equation is ...

The boundary condition can be used to find C:

Particular solution
Solving this equation for y, we get ...
