From your other topic where we went from polar to rectangular form, you should be able to see that:
and by Pythagoras we know:
What do we get if we divide (2) by (1)? What quadrant is the angle in?
What do we get if we use (1) and (2) to substitute into (3)?