It looks like you're missing some parentheses.
I think this is the equation you mean:
sin(x)/(1-cos(x)) + sin(x)/(1+cos(x))
your common denominator is (1-cos(x))*(1+cos(x)), which is the difference of squares simplification and is equal to (1-cos^2(x)) = sin^2(x)
Numerator: sin(x)*(1+cos(x)) + sin(x)*(1-cos(x))
= sin(x) +sin(x)cos(x) + sin(x) - sin(x)cos(x)
= 2sin(x)
Answer: 2sin(x)/sin^2(x) = 2/sin(x) = 2csc(x)