Help on Partial Fractions

Hi

The following questions i am having trouble finding the partial fractions to them:

1)$\displaystyle \frac{x^2+x-1}{(x^2+1)^2}$

2)Can someone tell me if i have done this correctly.

$\displaystyle \frac{x^2-1}{x^2-5x+6}$

Do Long Division and i get this:$\displaystyle 1+\frac{-5x+7}{(x-3)(x-2)}$

$\displaystyle \frac{A}{(x-3)}+\frac{B}{(x-2)}$

$\displaystyle A(x-2)+B(x-3)=-5x+7$

$\displaystyle A+B=-5$

$\displaystyle A=-5-B$

$\displaystyle -2A-3B=7$

$\displaystyle -2(-5-B)-3B=7$

$\displaystyle 10-B=7$

$\displaystyle B=3$

$\displaystyle A=-5-3$

$\displaystyle A=-8$

therefore: $\displaystyle 1-\frac{8}{(x-3)}+\frac{3}{(x-2)}$

now answers says its $\displaystyle 1-\frac{3}{(x-2)}+\frac{8}{(x-3)}$.

i have tried doing this equation many times i don't understand how they got the above answer.

P.S