In my text book it is directly stated that the general solution of the equation $ \sin (A) = \sin (B)$ , is
$ A = 2n\pi + B$ and $A = (2n +1)\pi - B$
but where is the second solution coming from? Since period of $\sin$ function is $2\pi$, shouldn't the solutions be, $ A = 2n\pi + B$ and $ A = 2n\pi - B$ ?


say, $ \sin (A) = \sin (B) = s$ , from this we can approach the solution by finding the solution set of $ \sin (B) = s$ , since $ \sin (A) = s$ , we can say that $ A = $ solution set of $B$. Lets solve, $ \sin (B) = s$ We will use Principal Values, Secondary Values and quadrant diagrams to approach the solution and convey clarity. there are two possible cases, one where $s\ge 0 $ and the other where $ s \le 0$.
For the case where $s\ge 0 $, the required solution will lie in the 1st or the 2nd quadrant as shown below:
and the case where $ s \le 0$, the solution will lie in the 3rd or the 4th quadrant, as shown below:
so the general solution should give formula that will help generate the infinite set of angles. The formula(s) in question should address all the four lines, namely, PV+ , SV+, PV-, SV- and in order to generate the complete solution set for the complete range $ -1\le s \le1$
The first solution $ A = 2n\pi + B$ , is for the solutions of PV+ or PV- depending on the value of $s$. Any rotation of angles of $2n\pi$ will result in the position shown below:
Lets say the PV+ is $\theta$ and $\theta > 0$ and acute , when $ \sin (B) = s$ and $ s \ge 0$. Also lets say the PV- is $\beta$ and $\beta < 0$ and acute , when $ \sin (B) = s$ and $ s \le 0$. (Note: plugging $\beta$ into $A = 2n\pi + B$ is a subtraction as $\beta < 0$)
The diagrams below should clarify how $ A = 2n\pi + B$ gives solutions for PV+ and PV-:
Recall:
Lets say the PV+ is $\theta$ and $\theta > 0$ and acute , when $ \sin (B) = s$ and $ s \ge 0$.
Also lets say the PV- is $\beta$ and $\beta < 0$ and acute , when $ \sin (B) = s$ and $ s \le 0$.
PV or principal value is also the associated acute angle.
The second solution $A = (2n+1)\pi - B$ gives the solutions for SV+ and SV-. any rotation of angles of $(2n+1)\pi$ will result in the position shown below:
So $ (2n+1)\pi - \theta$ gives all solution for the SV+ location, while $ (2n+1)\pi - \beta$ gives us all the solution for the SV- location.
(Note: Since $\beta<0$, $ (2n+1)\pi - \beta$ is essentially an addition)
The diagrams below should clarify how the general formula leads to SV+ and SV-:
(Note: Since $\beta<0$, $ (2n+1)\pi - \beta$ is essentially an addition)