A great tip,
If you can't find the answer, try writing everything into the same thing (such as cos)
It might take a while, but it usually does deliver an answer.
(oh, and I used x for the answer because it was a lot easier to use)
$$\frac{tan^2(x)+2}{1+tan^2(x)} = 1+cos^2(x)$$
rewrite this to
$$tan^2(x)+2 = (1+cos^2(x))(1+tan^2(x))$$
Now given that
$$tan^2(x) = (tan(x))^2 = (\frac{sin(x)}{cos(x)})^2 = \frac{sin^2(x)}{cos^2(x)}$$
We write
$$\frac{sin^2(x)}{cos^2(x)}+2 = (1+cos^2(x))(1+\frac{sin^2(x)}{cos^2(x)})$$
Make common denominators
$$\frac{cos^2(x)}{cos^2(x)}$$
$$\frac{sin(x)^2}{cos(x)^2}+\frac{2cos^2(x)}{cos^2(x)} = (1+cos^2(x))(\frac{cos^2(x)}{cos^2(x)}+\frac{sin(x)^2}{cos(x)^2})$$
$$\frac{sin^2(x)+2cos^2(x)}{cos^2(x)} = (1+cos^2(x))(\frac{cos^2(x)+sin^2(x)}{cos^2(x)}$$
Multiply both sides by
$$cos^2(x)$$
$$sin^2(x) + 2cos^2(x) = (1+cos^2(x))(cos^2(x) + sin^2(x))$$
Make use of the identity
$$sin^2(x)+cos^2(x) = 1 \Leftrightarrow sin^2(x) = 1 - cos^2(x)$$
$$1-cos^2(x)+2cos^2(x) = (1+cos^2(x))(cos^2(x)+1-cos^2(x))$$
$$1+cos^2(x) = 1+cos^2(x)$$
Reinout 