Hello, rubeio!
\(\displaystyle \L\frac{1\,-\,\cot^2x}{1\,+\,\cot^2x}\)\(\displaystyle \,+\,2\cdot\cos^2x\:=\:1\)
I usually don't recommend changin everything to sines and cosines; there's usually a better way.
\(\displaystyle \;\;\)But this time, it works out nicely . . .
We have: \(\displaystyle \L\,\frac{1\,-\,\frac{\cos^2x}{\sin^2x}}{1\,+\,\frac{\cos^2x}{\sin^2x}}\)\(\displaystyle \,+\,2\cdot\cos^2x\)
Multiply top and bottom of the fraction by \(\displaystyle \sin^2x:\)
\(\displaystyle \L\;\;\frac{\sin^2x\left(1\,-\,\frac{\cos^2x}{\sin^2x}\right)}{\sin^2x\left(1\,+\,\frac{\cos^2x}{\sin^2x}\right)}\)\(\displaystyle \,+\,2\cdot\cos^2x \;= \;\L\frac{\sin^2x\,-\,\cos^2x}{\sin^2x\,+\,\cos^2x}\)\(\displaystyle \,+\,2\cos^2x\)
Since \(\displaystyle \,sin^2x\,+\,\cos^2x\:=\:1\), we have: \(\displaystyle \,\sin^2x\,-\,\cos^2x\,+\,2\cdot\cos^2x \;=\;\sin^2x\,+\,\cos^2x\;=\;1\)
\(\displaystyle \L\frac{\sin^2x\,-\,\tan x}{\cos^2x\,-\,\cot x}\)\(\displaystyle \;=\;\tan^2x\)
There are several approaches to this one . . . none of them are pleasant.
We have: \(\displaystyle \L\,\frac{\sin^2x\,-\,\frac{\sin x}{\cos x}}{\cos^2x\,-\,\frac{\cos x}{\sin x}}\)
Factor: \(\displaystyle \L\,\frac{\sin x\left(\sin x\,-\,\frac{1}{\cos x}\right)}{\cos x\left(\cos x\,-\,\frac{1}{\sin x}\right)} \;= \;\frac{\sin x\left(\frac{\sout{\sin x\cdot\cos x\,-\,1}}{\cos x}\right)}{\cos x\left(\frac{\sout{\sin x\cdot\cos x\,-\,1}}{\sin x}\right)} \;= \;\frac{\sin x\cdot\frac{1}{\cos x}}{\cos x\cdot\frac{1}{\sin x}}\)
\(\displaystyle \L\;\;\;=\;\frac{\sin^2x}{\cos^2x}\;=\;\left(\frac{\sin x}{\cos x}\right)^2\)\(\displaystyle \;= \;\tan^2x\)