This can be written:
(sinA/cosA+1/cosA-1)/(sinA/cosA-1/cosA+1). Multiply top and bottom by cosA:
(sinA+1-cosA)/(sinA-1+cosA).
Multiply top and bottom by sinA+1-cosA:
(sinA+1-cosA)2/(sin2A-(1-cosA)2)=
(sin2A+1-2cosA+cos2A+2sinA-2sinAcosA)/(sin2A-1+2cosA-cos2A)=
(2-2cosA+2sinA(1-cosA))/(2cosA-2cos2A). Divide top and bottom by 2 and factorise:
(1-cosA)(1+sinA)/(cosA(1-cosA))=(1+sinA)/cosA=tanA+secA.