<s>[INST] Equation simplification, can't get it right $$\frac{1}{\frac{x-1}{x+2}}-\frac{2}{x^2-1}$$ should be simplified into $$\frac{x^2+3x}{x^2-1} \quad .$$
However, when I try to do it (tried several times), I fail to get it done right:
$$\frac{1}{\frac{x-1}{x+2}}-\frac{2}{x^2-1} = 1 * \frac{x+2}{x-1} - \frac{2}{x^2-1} $$  $$=\frac{x(x+2)-2}{x^2-1} = \frac{x^2+2x-2}{x^2-1}$$
What am I doing wrong?
Thanks a lot for the help
 [/INST] $$\begin{align}\frac{x+2}{x-1}-\frac{2}{x^2-1}&=\frac{x+2}{x-1}-\frac{2}{(x-1)(x+1)}\\&=\frac{(x+2)(x+1)}{(x-1)(x+1)}-\frac{2}{(x-1)(x+1)}\\&=\frac{(x+2)(x+1)-2}{(x-1)(x+1)}\\&=\frac{x^2+3x}{x^2-1}.\end{align}$$
</s>