You can put this solution on YOUR website! I will take theta as x
(sinx + 1)/(1+ cosx) + cosx/sinx = 2cosecx
(sinx(sinx+1) + cosx(1+cosx))/sinx*(1+cosx) =
((sinx)^2 + sinx + (cosx)^2 + cosx)/sinx*(1+cosx)
(sinx + 1 + cosx)/sinx*(1+cosx)
you can separate like this.
sinx/sinx*(1+cosx) + (1+cosx)/sinx*(1+cosx)
1/(1+cosx) + 1/sinx
This doesn't give the given answer 2cosecx. Something went wrong with the question.