We use
#cos^2x+sin^2x=1#
#sin^2x=1-cos^2x#
#sin^2(x/2)=1-cos^2(x/2)#
Dividing by #cos^2(x/2)#
#sin^2(x/2)/cos^2(x/2)=(1-cos^2(x/2))/cos^2(x/2)#
#tan^2(x/2)=(1-cos^2(x/2))/cos^2(x/2)#
Therefore,
#=1-(1-cos^2(x/2))/cos^2(x/2)#
#=(cos^2(x/2)-1+cos^2(x/2))/(cos^2(x/2))#
#=(2cos^2(x/2)-1)/(cos^2(x/2))=cosx/cos^2(x/2)#
And,
#1+tan^2(x/2)=1+(1-cos^2(x/2))/cos^2(x/2)#
#=(cos^2(x/2)+1-cos^2(x/2))/(cos^2(x/2))#
#=1/cos^2(x/2)#
Therefore,
#RHS=(1-tan^2(x/2))/(1+tan^2(x/2))=(cosx/cos^2(x/2))/(1/cos^2(x/2))#
#=cosx=LHS#
#QED#