The following identities are important for this problem:
-#tantheta = sintheta/costheta#
#cosx/(1 - sinx/cosx) - sin^2x/(cosx - sinx) = cosx + sinx#
#cosx/((cosx - sinx)/cosx) - sin^2x/(cosx - sinx) = cosx + sinx#
#cos^2x/(cosx - sinx) - sin^2x/(cosx - sinx) = cosx + sinx#
#(cos^2x - sin^2x)/(cosx - sinx) = cosx + sinx#
Factor the numerator on the left as a difference of squares, #a^2 - b^2 = (a + b)(a - b)#.
#((cosx + sinx)(cosx - sinx))/(cosx - sinx) = cosx + sinx#
#cosx + sinx = cosx + sinx#
Identity Proved!!
Hopefully this helps!