This problem is being asked in the regards of the following question
The resultant of two forces has magnitude $20\hspace{1mm}N$. One of the forces is of magnitude $20\sqrt{3}\hspace{1mm}N$ and makes an angle of $30^\circ$ with the resultant. Then what is the magnitude of the other force?
The solution for the above question in my textbook is given as follows
Let $P$ be the unknown force. $$P^2 = (20\sqrt{2})^2 + 20^2 - 2(20)(20\sqrt{3})\cos(30^\circ)$$ $$1600 - 1200 = 400$$
Therefore, $P = \sqrt{400} = 20\hspace{1mm}N$
My issue with the above solution is that first why is the term containing the cosine subtracted not added doesn't the formula add the cosine term.
Another question since the angle is given between the vector and the resultant and not between the 2 vectors how can it be used in the formula to give us the answer.
Any help would be highly appreciated!