we will use the formula of tan(A+B)= (tanA+tanB)/(1-tanAtanB)
and tan(A-B)= (tanA-tanB)/(1+tanAtanB)
tan[(pie/4)+(x/2)]= [1+tan(x/2)]/[1-tan(x/2)] ......(1)
tan[(pie/4)-(x/2)]= [1-tan(x/2)]/[1+tan(x/2)]......(2)
now add the equation (1) and (2) which is LHS of question. So we get:
{[1+tan(x/2)]^2 + [1- tan(x/2)]^2}/1-tan^2(x/2)=2[1+tan^2(x/2)]/1-tan^2(x/2)= 2/cosx = 2secx =RHS
Hence proved.