<s>[INST] Explain this step How the following conversion is justified ?
$$\cos \biggl( \theta + \frac{2\pi}{3} \biggr) + \cos \biggl( \theta + \frac{4\pi}{3} \biggr) = \cos \biggl(  \frac{\pi}{2} - \theta \biggr) - \cos \biggl(  \frac{\pi}{3} +\theta \biggr) $$
 [/INST] First, notice that 
$$\cos(x+\pi) = \cos(x)\cos(\pi) - \sin(x)\sin(\pi) = \cos(x)(-1)-\sin(x)(0) = -\cos(x).$$
So, rewriting, using the above, and using that $\cos(-x)=\cos x$ you have:
\begin{align*}
\cos\left(\theta+\frac{2\pi}{3}\right) + \cos\left(\theta+\frac{4\pi}{3}\right) &= \cos\left(\left(\theta-\frac{\pi}{3}\right)+\pi\right) + \cos\left(\left(\theta+\frac{\pi}{3}\right)+\pi\right)\\
&= -\cos\left(\theta-\frac{\pi}{3}\right) - \cos\left(\theta+\frac{\pi}{3}\right)\\
&= -\cos\left(\frac{\pi}{3}-\theta\right) - \cos\left(\frac{\pi}{3}+\theta\right).
\end{align*}
So: the equality as written cannot hold: you would need $\cos(\frac{\pi}{2}+\theta) = - \cos(\frac{\pi}{3}-\theta)$ for all $\theta$, and plugging in $\theta=0$ shows this cannot hold. I suspect your $\frac{\pi}{2}$ should have been a $\frac{\pi}{3}$, and that you are missing a minus sign before the first term. If this is not the case, then please edit the question to give the equality you are actually trying to prove. 
</s>