how do i solve so left hand side equals right hand side?

cos2x=(1-tan^2x)/(1+tan^2x)

remember that tan^2 x + 1 = sec^2 x

also that cos 2x = 2cos^2 x - 1

RS = (2 - (1 + tan^2 x) )/sec^2 x
= (2 - sec^2 x)/sec^2 x
= 2/sec^2x - 1
= 2cos^2 x - 1
= cos 2x
= LS