If $\cos a = \cos a \cos b - \sin a \sin b$, then $b = 2n\pi$ The solutions to a tutorial question I am working on are as follows:
$$\cos\left(\frac{p}{\sqrt{\eta}}x\right) = \cos\left(\frac{p}{\sqrt{\eta}}x\right)\cos\left(\frac{p}{\sqrt{\eta}}2L\right)-\sin\left(\frac{p}{\sqrt{\eta}}x\right)\sin\left(\frac{p}{\sqrt{\eta}}2L\right)$$

Clearly if LHS is equal to RHS, then
$$\frac{2Lp}{\sqrt{\eta}} = 2n \pi$$

I am confused as to how this is clear. If anyone is able to provide more working that would be great.

Note: (From comment).  The question was originally about concluding $\cos\left(\frac p\eta x\right)$, given $$\cos\left(\frac p\eta x\right)= \cos\left(\frac p{\eta} x +\frac p{\eta}2L\right)$$  The solution then expanded by using the sum of angles formula for $\cos$.
Hint:  The RHS gives $$\cos\left(\frac p{\eta} x +\frac p{\eta}2L\right)^{(\dagger)}$$

So what can you conclude if $$\cos\left(\frac p\eta x\right) = \cos\left(\frac p{\eta} x +\color{blue}{\frac p{\eta}2L}\right)\;?$$

This equality only occurs when $\color{blue}{\dfrac {2Lp}{\eta}} = 2n\pi$, where $n$ is an integer.  (Note that $2\pi (n)$ is $n$ full revolutions of the unit circle).



$^{(\dagger)}$ If this is how the problem  originally appeared, I'd suggest NOT expanding using the sum of angles identity for $\cos$.)
Let $\frac{p}{\sqrt{\eta}}=l$
Then, $RHS=\cos(lx+2Ll)$
$\therefore \cos(lx+2Ll)=\cos(lx)$
$\therefore lx+2Ll=2n\pi \pm lx$
$\therefore 2Ll=2\eta\pi,2\eta\pi-2lx$
$\frac{2Lp}{\sqrt{\eta}}=2\eta\pi,2\eta\pi-2\frac{p}{\sqrt{\eta}}x$