Start from the first member:
#cos theta/(1-sintheta)#
multiply and divide by #(1+sin theta)#:
#cos theta/(1-sintheta) = cos theta/(1-sintheta) (1+sin theta)/(1+sin theta)#
#cos theta/(1-sintheta) = cos theta(1+sintheta)/ (1-sin^2 theta)#
#cos theta/(1-sintheta) = cos theta(1+sintheta)/ cos^2 theta#
#cos theta/(1-sintheta) = (1+sintheta)/ cos theta#
#cos theta/(1-sintheta) = 1/cos theta +sintheta/ cos theta#
#cos theta/(1-sintheta) = sec theta + tan theta#