x^2+1=(1+cosA)^2/sin^2A+1=
(1+2cosA+cos^2A+sin^2A)/sin^2A=
2(1+cosA)/sin^2A; (1)
x^2-1=(1+2cosA+cos^2A-sin^2A)/sin^2A=
(1+2cosA+2cos^2A-1)/sin^2A=
2cosA(1+cosA)/sin^2A. (2)
(x^2+1)/(x^2-1)=(1)/(2)=2(1+cosA)/(2cosA(1+cosA))=secA QED
Also note that cosecA+cotA=(1+cosA)/sinA and 1/x=(1-cosA)/sinA
Multiply these together: (1-cos^2A)/sin^2A=sin^2A/sin^2A=x/x=1, so the two given equations are equivalent.
Or (1+cosA)/sinA=sinA/(1-cosA), because 1-cos^2A=sin^2A when we cross-multiply, substituting x=cosecA+cotA and 1/x=cosecA-cotA, i.e., x=1/(cosecA-cotA)=sinA/(1-cosA).