Start with Euler's formula:
${e}^{i\theta}=\cos{\theta}+i\sin{\theta}$
Squaring both sides gives:
${({e}^{i\theta})}^{2}={(\cos{\theta}+i\sin{\theta})}^{2}$
Which, using the laws of exponents and the expansion of brackets, becomes:
${e}^{2i\theta}=\cos^{2}{\theta}+2i\sin{\theta}\cos{\theta}+{i}^{2}\sin^{2}{\theta}$
The left can be written with the exponent as a multiple of $i$ and the right can be simplified because $i^{2}=-1$:
${e}^{i(2\theta)}=\cos^{2}{\theta}-\sin^{2}{\theta}+2i\sin{\theta}\cos{\theta}$
However as $e^{i(2\theta)}$ is in the form $e^{ix}$ it can be expressed through Euler's formula:
$\cos{2\theta}+i\sin{2\theta}=\cos^{2}{\theta}-\sin^{2}{\theta}+2i\sin{\theta}\cos{\theta}$
The real parts can be equated:
$\Re{(\cos{2\theta}+i\sin{2\theta})}=\Re{(\cos^{2}{\theta}-\sin^{2}{\theta}+2i\sin{\theta}\cos{\theta})}$
Which leaves:
$\cos{2\theta}=\cos^{2}{\theta}-\sin^{2}{\theta}$
As $\sin^2{\theta}=1-\cos^2{\theta}$:
$\cos{2\theta}=\cos^{2}{\theta}-(1-\cos^2{\theta})$
This bracket can be multiplied out to give:
$\cos{2\theta}=2\cos^{2}{\theta}-1$
Which can be rearranged to:
$\cos^{2}{\theta}=\frac{\cos{2\theta}+1}{2}$