Neither of those answers is correct. Assuming that by cosec(x) you mean cosecant(x) = 1/sin(x). It's usually abbreviated csc(x).
What I get is
Now look at that last term on the right. It's the square root of a negative number. Over the Real numbers this is not defined. Is this equation meant to be over the Complex numbers? If so the last line is your solution. If not, there is no solution.