1+sec(x)=1+(1/cos(x))=(1+cos(x))/cos(x);
1+cosec(x)=1+(1/sin(x))=(1+sin(x))/sin(x).
Therefore we have:
[(1+sin(x))/(1+cos(x))][(1+cos(x))/cos(x))sin(x)/(1+sin(x))]=
(1/cos(x))sin(x)=sin(x)/cos(x)≡tan(x).
So this is not an equation to be solved but an identity to be proved true for all x.
The above workings prove the identity.