The integral itself is:
$$\int \frac{x^4-2x^2+2}{x^3-2x^2-x+2}dx$$
After long division I got:
$$\int \Big(x+2+\frac{3x^2-2}{x^3-2x^2-x+2}\Big)dx$$
And after simplifying the denumerator I got:
$$x^3-2x^2-x+2 = x^2(x-2)-1(x-2) = (x^2-1)(x-2)$$
But I am not sure about $A$ and $B$ values
Should I put $A$ $B$ or $Ax$ $Bx$ ?