# frac(cos(theta))(1+sin(theta)) + frac(1+sin(theta))(cos(theta))#
Multiply the left fraction by #cos(theta)# and the right fraction by #(1+sin(theta))# to put everything under the same denominator:
#= frac((cos(theta))^2 +(1+sin(theta))^2)((1+sin(theta))*cos(theta))#
Then we open the parentheses (at the numerator, just leave the denominator untouched) and get:
#= frac(cos^2(theta)+1+2sin(theta)+sin^2(theta))((1+sin(theta))*cos(theta))#
You should remember the identity #cos^2(theta)+sin^2(theta) =1# which you can see in the numerator. So we get:
#= frac(1+2sin(theta)+1)((1+sin(theta))*cos(theta))#
which simplifies to:
#= frac(2+2sin(theta))((1+sin(theta))*cos(theta))#
but we can factor out the #2# so:
#= 2*frac(1+sin(theta))((1+sin(theta))*cos(theta))#
Now remove the #(1+sin(theta))# from top (numerator) and bottom (denominator) (you can do this because any number over itself is 1).
Then you are left with:
#= 2*frac(1)(cos(theta))#
and since #frac(1)(cos(theta))=sec(theta)# by definition of the secant you do indeed have:
#= 2*sec(theta)#
Q.E.D.