Multiple the numerator and denominator by "x."
You originally have
\frac{2}{x+x^{-1}}
then you just multiply by "1" in the form \frac{x}{x}
in particular, since 2*x = 2x and (x+x^{-1})*x = x^2+1, the result follows.
http://math.stackexchange.com/is a good website to ask math problems because one may use LaTeX to clearly write out answers.