show that cos2x=1-tan^ 2 x /1+tan^2x=2cos^2x-1

cos 2x

= cos(x+x)
= cosxcosx - sinxsinx
= cos^2 x - sin^2 x
= cos^2 x - (1 - cos^2 x)
= 2 cos^2 x - 1, the last part of your equation.

all we need it to look at now is the middle part of
(1 - tan^2 x)/(1 + tan^2 x) , notice the necessary brackets
= (1 - sin^2 x/cos^2 x)/(1 + sin^2 x/cos^2 x)
= [ (cos^2 x - sin^2 x)/cos^2 x ]/[ (cos^2 x + sin^2 x)/cos^2 x ]
= (cos^2 x - sin^2 x)/cos^2 x * cos^2 x/(cos^2 x + sin^2 x)
= (cos^2 x - sin^2 x)/1
= cos^2 x - sin^2 x
as seen above