#LHS=(tanx - secx + 1)/(tanx + secx - 1) #
#=(tanx - secx + 1)/(tanx + secx - (sec^2x-tan^2x)) #
#=(tanx - secx + 1)/(tanx + secx - (secx-tanx)(secx+tanx)) #
#=(cancel(tanx - secx + 1))/((tanx + secx)(cancel(1 - secx+tanx))#
#=1/(secx+tanx)#
#=1/(1/cosx+sinx/cosx)#
#=1/((1+sinx)/cosx)#
#= cosx/(1 + sinx)=RHS#
Alternative method
#LHS=(tanx - secx + 1)/(tanx + secx - 1) #
#=(cos^2x(tanx - secx + 1))/(cos^2x(tanx + secx - 1)) #
#=(cosx(sinx/cosx*cosx - 1/cos*cosx + cosx))/(cos^2x*sinx/cosx + cos^2x*1/cosx - cos^2x) #
#=(cosx(sinx- 1 + cosx))/(cosx*sinx + cosx - (1-sin^2x)) #
#=(cosx(sinx- 1 + cosx))/(cosx(sinx + 1) - (1-sinx)(1+sinx)) #
#=(cosx(sinx- 1 + cosx))/((1+sinx)(cosx - 1+sinx)) #
#=cosx/(1+sinx) =RHS#