[tex]\bf \cfrac{2}{x}+\cfrac{x}{x+1}+\cfrac{x^2}{x-1}\impliedby
\begin{array}{llll}
\textit{now, our LCD is}\\
x(x+1)(x-1)
\end{array}
\\\\\\
\cfrac{[2~(x+1)(x-1)]~+~[x~[x(x-1)]]~+~[x^2~[x(x+1)]]}{x(x+1)(x-1)}
\\\\\\
\cfrac{[2x^2-2]~+~[x^3-x^2]~+~[x^4+x^3]}{x(x+1)(x-1)}
\\\\\\
\cfrac{2x^2-2~+~x^3-x^2~+~x^4+x^3}{x(x+1)(x-1)}
\implies
\cfrac{x^4+2x^3-x^2-2}{x(x+1)(x-1)}[/tex]
[tex]\bf \textit{and now, if you recall }\textit{difference of squares}
\\ \quad \\
(a-b)(a+b) = a^2-b^2\qquad \qquad
a^2-b^2 = (a-b)(a+b)\\\\
-------------------------------\\\\
\textit{then we can combine }(x+1)(x-1)\implies x^2-1
\\\\\\
\cfrac{x^4+2x^3-x^2-2}{x(x+1)(x-1)}\implies \cfrac{x^4+2x^3-x^2-2}{x(x^2-1)}\implies \cfrac{x^4+2x^3-x^2-2}{x^3-x}[/tex]