You need to use the facts that cot theta = 1/tan theta cotθ=1tanθ and that tan theta = sin theta/cos thetatanθ=sinθcosθ
Then
cot theta +tan theta * sec theta = cos theta/sin theta + sin theta / cos theta * 1/cos thetacotθ+tanθ⋅secθ=cosθsinθ+sinθcosθ⋅1cosθ
We know that sin^2theta + cos^2theta = 1sin2θ+cos2θ=1 so
cos^2theta = 1 - sin^2thetacos2θ=1−sin2θ and
costheta = sqrt(1-sin^2theta)cosθ=√1−sin2θ
Substituting these into the expression gives
sqrt(1-sin^2theta)/sintheta +sintheta/(1-sin^2theta)√1−sin2θsinθ+sinθ1−sin2θ
=((1-sin^2theta)^(3/2) +sin^2theta)/(sintheta(1-sin^2theta)=(1−sin2θ)32+sin2θsinθ(1−sin2θ)