Everything starts with $$\sin(a+b)=\sin a\cos b+\cos a\sin b$$ This is an identity, it holds for all $a$ and $b$. In particular, you're allowed to replace $b$ with $a$, so long as you do it consistently throughout, and you get $$\sin2a=2\sin a\cos a$$ Stop me if you didn't follow this. Now we can replace $a$ everywhere with $2x$ and get $$\sin 4x=2\sin2x\cos2x$$ Now there's a $\sin2x$ in that formula; we can use double-angle on it to get $$\sin4x=2(2\sin x\cos x)\cos2x$$ Now multiplication is associative, which means as long as all we're doing is multiplication, we don't need parentheses. On the right side, we're multiplying 5 things: $$\sin4x=2\times2\times\sin x\times\cos x\times\cos2x$$ Finally, $2\times2=4$, so $$\sin4x=4\sin x\cos x\cos2x$$