How do you find the derivative of

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

?

I have the answer which is:
(4x(3+x^2))/(x^2-1)^3)

I can't figure out my mistake when I'm doing it though. Could you solve it step by step?

You don't show your intermediate steps, but you have to use the quotient rule to get

dy/dx = [ -4x(x^2-1)^2 + 2(x^2+1)^2 (2)(x^2-1)(2x)]/(x^2-1)^4
= -4x(x^1 - 1) [(x^2 - 1) - 2(x^2+1)]/(x^2-1)^4
= -4x[-x^2 - 3)/(x^2-1)^3
or 4x(x^2 + 3)/(x^2 - 1)^3 which is your answer !
or
= (4x^3 + 12x)/(x^2 - 1)^3

I don't know what answer was expected.