[tex]\frac{x-1}{x^2+3x+2}\\\frac{x-1}{(x+1)(x+2)}\\\frac{x-1}{(x+1)(x+2)}=\frac{A}{x+2}+\frac{B}{x+1}\\x-1=A(x+1)+B(x+2)\\\\\text{ Let } x=-1 \text{ then } -2=A(0)+B(-1+2) \text{ which means } B=-2\\\\\text{ Instead of choose } x \text{ to be -1, let's now set it equal to -2 to find } A\\\\-3=A(-1)+B(-2+2)\\-3=-A\\A=3\\\\ \text{ So your integral becomes } \\\int \frac{3}{x+2} dx+\int \frac{-2}{x+1} dx\\3 \ln|x+2|-2\ln|x+1|+C\\\\or\\-2\ln|x+1|+3\ln|x+2|+C[/tex]