I'm only concerned about the expressions highlighted in red.

How did they get from the first to the second? I would have expected something like, $\displaystyle 2 (\vec{u} \cdot \vec{v}) \lVert \vec{u} \rVert \lVert \vec{v} \rVert$. Is that not correct? Or are they the same expression?