We can just take B as 1.
So to make those identitically equal, we must have
(1) and
(2)
Dividing equals by equals, using (2) and (1)
To get a positive coterminal angle we add 360°
Squaring both sides of (1) and (2) and adding them:
Substituting:
Edwin