When we are given a fraction say f(x)=(3-2x-x^2)/(x^2-1). This comprises of two fractions - say one g(x)=3-2x-x^2 in numerator and the other h(x)=x^2-1, in the denominator. Here we use quotient rule as described below.
Quotient rule states if f(x)=(g(x))/(h(x))
then (df)/(dx)=((dg)/(dx)xxh(x)-(dh)/(dx)xxg(x))/(h(x))^2
Here g(x)=3-2x-x^2 and hence (dg)/(dx)=-2-2x and as h(x)=x^2-1, we have (dh)/(dx)=2x and hence
(df)/(dx)=((-2-2x)xx(x^2-1)-2x xx(3-2x-x^2))/(x^2-1)^2
= (-2x^3-2x^2+2x+2-6x+4x^2+2x^3)/(x^2-1)^2
= (2x^2-4x+2)/(x^2-1)^2
or (2(x-1)^2)/(x^2-1)^2
= 2/(x+1)^2
Observe that (3-2x-x^2)/(x^2-1)=((1-x)(3+x))/((x+1)(x-1))=(-3-x)/(x+1) and using quotient rule
(df)/(dx)=(-(x+1)-(-3-x))/(x+1)^2=2/(x+1)^2