x^2/(x-1)(x+1) = x^2/x^2-1 = 1,-1

Therefore,

x^2/(x-1)(x+1) = 1 + -1/(x-1)(x+1)

-1/(x-1)(x+1) = A/(x-1) + B/(x+1)

-1 = Ax + A + Bx - B

-1 = (A+B)x +A - B

A+B = 0, B = -A

-1 = A - B = A - (-A) = 2A

-1 = 2A, A = -1/2,

B = -(-1/2) = 1/2

Therefore,

x^2/(x-1)(x+1) = 1 - 1/2(x-1) + 1/2(x+1)

But somehow the answer given to me is

x^2/(x-1)(x+1) = 1+1/2(x-1)-1/2(x+1)

Not sure which step I doing wrong, please help me on this. Thank you.