I won't do the whole thing for you, just give you a tip and then you can have a go...
Use this:
<a href="http://www.codecogs.com/eqnedit.php?latex=(x@plus;\frac{1}{x})^2=x^2@plus;\frac{1}{x^2}@plus;2 \\ \therefore x^2@plus;\frac{1}{x^2}=(x@plus;\frac{1}{x})^2-2" target="_blank"><img src="http://latex.codecogs.com/gif.latex?(x+\frac{1}{x})^2=x^2+\frac{1}{x^2}+2 \\ \therefore x^2+\frac{1}{x^2}=(x+\frac{1}{x})^2-2" title="(x+\frac{1}{x})^2=x^2+\frac{1}{x^2}+2 \\ \therefore x^2+\frac{1}{x^2}=(x+\frac{1}{x})^2-2" /></a>