Show $\displaystyle cos \theta + cos (\theta + \alpha) + cos (\theta + 2\alpha) = (2 cos \alpha + 1) cos (\theta + \alpha)$

Answer:

$\displaystyle cos \theta + cos (\theta + \alpha) + cos (\theta + 2 \alpha)$

$\displaystyle =[cos (\theta + 2 \alpha) + cos \theta] + cos (\theta + \alpha)$

$\displaystyle =2 cos (\theta + \alpha) cos \alpha + cos (\theta + \alpha)$

$\displaystyle =(2 cos \alpha + 1)cos (\theta + \alpha)$

My question is what happen between this step?

$\displaystyle =2 cos (\theta + \alpha) cos \alpha + cos (\theta + \alpha)$

$\displaystyle =(2 cos \alpha + 1)cos (\theta + \alpha)$