<s>[INST] Why is my alternate method of calculating scalar products not working? The exercise is such: Given that $|\vec{a}| = 3$, $|\vec{b}| = 2$ and $\varphi = 60^{\circ}$ (the angle between vectors $\vec{a}$ and $\vec{b}$), calcluate scalar product $(\vec{a}+2\vec{b}) \cdot (2\vec{a} - \vec{b})$.
My initial thought was to solve the requested product by "sticking" separately calculated fragments together and then follow the definition of scalar product, which is
$$\vec{a} \cdot \vec{b} = |\vec{a}| \cdot |\vec{b}| \cdot \cos\varphi.$$
Via observation
$$\vec{a} \cdot \vec{a} = |\vec{a}| \cdot |\vec{a}| \cdot \cos0^{\circ} = |\vec{a}|^2 \Longrightarrow |\vec{a}| = \sqrt{\vec{a} \cdot \vec{a}}$$
we can get values of $|\vec{a}+2\vec{b}|$ and $|2\vec{a} - \vec{b}|$ (mind the notation: $a^2$ in this case represents $a^2 = |\vec{a}|^2$, and $b^2 = |\vec{b}|^2$):
\begin{align*}
|\vec{a}+2\vec{b}| &= \sqrt{(\vec{a}+2\vec{b}) \cdot (\vec{a}+2\vec{b})} =\sqrt{a^2 + 4|\vec{a}| \cdot |\vec{b}| \cdot \cos 60^{\circ} + b^2} = \\
&= \sqrt{3^2 + 4 \cdot 3 \cdot 2 \cdot \frac{1}{2}+2^2} = 5.
\end{align*}
Similarly,
\begin{align*}
|2\vec{a} - \vec{b}| &= \sqrt{(2\vec{a} - \vec{b}) \cdot (2\vec{a} - \vec{b})} = \sqrt{4a^2 - 4|\vec{a}| \cdot |\vec{b}| \cdot \cos 60^{\circ} + b^2} = \\
&=\sqrt{4 \cdot 3^2 - 4 \cdot 3 \cdot 2 \cdot \frac{1}{2} + 2^2} = 2\sqrt{7}.
\end{align*}
Now we plug both results in:
$$(\vec{a} + 2\vec{b}) \cdot (2\vec{a} - \vec{b}) = |\vec{a} + 2\vec{b}| \cdot |2\vec{a} - \vec{b}| \cdot \cos60^{\circ} = 5 \cdot 2\sqrt{7} \cdot \frac{1}{2} = 5\sqrt{7}.$$
However, this is not the right solution according to my textbook. The correct result is $19$. I thought about it for a bit and took a different route:
\begin{align*}
(\vec{a} + 2\vec{b}) \cdot (2\vec{a} - \vec{b}) &= \vec{a} \cdot 2\vec{a} - \vec{a} \cdot \vec{b} + 4 \vec{a} \cdot \vec{b} - 2\vec{b} \cdot \vec{b} = \\
&=2a^2 - |\vec{a}| \cdot |\vec{b}| \cdot \cos 60^{\circ} + 4 |\vec{a}| \cdot |\vec{b}| \cdot \cos 60^{\circ} - 2b^2 = \\
&= 2 \cdot 3^2 - 3 \cdot 2 \cdot \frac{1}{2} + 4 \cdot 3 \cdot 2 \cdot \frac{1}{2} - 2 \cdot 2^2 = 19.
\end{align*}
The second method clearly worked, while the first one failed miserably. But my question is why did my first approach fail? Did I get the wrong results when calculating $|\vec{a}+2\vec{b}|$ and $|2\vec{a} - \vec{b}|$? I have no idea. Please, help me understand my mistakes. Thank you in advance.
 [/INST] Note $$2\vec {b}\cdot 2\vec {b}=4b^2$$
Compare this with what you have in your first approach when calculating
$$
|\vec {a}+2\vec {b}|
$$
</s>