#(tanx-cotx)/(tanx+cotx)#
= #(sinx/cosx-cosx/sinx)/(sinx/cosx+cosx/sinx)# - (converting tan ad cot ratios into sin and cos ratios)
= #((sin^2x-cos^2x)/(sinxcosx))/((sin^2x+cos^2x)/(sinxcosx))# - (adding as in fractions)
= #(sin^2x-cos^2x)/(sinxcosx)xx(sinxcosx)/((sin^2x+cos^2x)#
= #(sin^2x-cos^2x)/cancel(sinxcosx)xxcancel(sinxcosx)/1# - (as #sin^2x+cos^2x=1# and cancelling like terms in numerator and denominator)
= #sin^2x-cos^2x#