$\frac{\sqrt{2}}{2} - \frac{\sqrt{2}}{2}e^{iw} = \frac{\sqrt{2}}{2}(1 - e^{iw})$
then pull out $e^{\frac{iw}{2}}$ and you get
$ = \frac{\sqrt{2}}{2}e^{\frac{iw}{2}}\left(e^{-\frac{iw}{2}} - e^{\frac{iw}{2}}\right) $
then pull out one $(-i)$ and push the $\frac{1}{2}$ inside. "Pull out one $(-i)$" might seem slightly weird since there was no real factor of $-1$ or $i$ multiplied in the entire expression, so what were really doing is multiplying by $1$ in a very convenient way. The reasoning behind multiplying by $1$ in this way is that we know the formula for complex sin ($\sin(x) = \frac{e^{ix} -e^{-ix}}{2i}$) and this clever multiplication allows us to get it.
So then we have
$ = -\sqrt{2}ie^{\frac{iw}{2}}\left(\frac{e^{\frac{iw}{2}} - e^{-\frac{iw}{2}}}{2i}\right) $
so now since in our last step we set up our equation to have the formula for complex sine, we'll now substitute the complex sine and we have
$= -\sqrt{2}ie^{\frac{iw}{2}}\sin\left(\frac{w}{2}\right) $