Recall the following "transition formula" for going from cosine to sine, where is arbitrary:

Since the numbers and are different by , and since sine is periodic with period , we have also that

whence

Since , we have that lies in the interval

Since you want to solve for , we have by the transition formula above that we might just as well solve

for , where the last equality follows from sine being an odd function.

Since , we have that lies in the interval . Hence both and are numbers in the interval , on which sine is injective, so in solving

for , we can apply to both sides to obtain

or