Remember: The trigonometric identities '
#sin^2theta+cos^2theta= 1# #hArr# #sin^2theta= 1-cos^2theta#
#1/costheta= sectheta# #hArr# #1/sectheta= costheta#
#(1+sectheta)/sectheta = (sin^2theta)/(1-costheta)#
#=># If we start from the right hand side, multiply by the conjugate of the denominator
#(1+sectheta)/sectheta = [(sin^2theta)/(1-costheta)]color(red)([(1+costheta)/(1+costheta)]#
#(1+sectheta)/sectheta = ((sin^2theta)(1+costheta)]/(1-cos^2theta)#
#(1+sectheta)/sectheta = [(sin^2theta)(1+costheta)]/(sin^2theta)#
#(1+sectheta)/sectheta = [cancel(sin^2theta)
(1+costheta)]/(cancel(sin^2theta)#
#(1+sectheta)/sectheta = 1+costheta#
#(1+sectheta)/sectheta = 1+1/(sectheta)# common denominator
#(1+sectheta)/sectheta = 1*[color(red)sectheta]/color(red)sectheta+1/(sectheta)#
#(1+sectheta)/sectheta = (1+sectheta)/sectheta#
Done!