<s>[INST] Algebraic identities Given that $$a+b+c=2$$ and $$ab+bc+ca=1$$
Then the value of 
$$(a+b)^2+(b+c)^2+(c+a)^2$$ is how much?

Attempt:
Tried expanding the expression. Thought the expanded version would contain a term from the expression of $a^3+b^3+c^3-3abc$, but its not the case. 
 [/INST] We can expand $$(a+b)^2+(b+c)^2+(c+a)^2$$ to get 
$$2 a^2 + 2 a b + 2 a c + 2 b^2 + 2 b c + 2 c^2 $$
We can rearrange this to be more useful:
\begin{align}2 a^2 + 2 a b + 2 a c + 2 b^2 + 2 b c + 2 c^2 &= 2 a^2 + 2b^2+2c^2 + 2 a b + 2 a c + 2 b c\\
&=2(a^2+b^2+c^2)+2(ab+ac+bc)\end{align}
We know the value of $ab+ac+bc$, so we can say that \begin{align}2(a^2+b^2+c^2)+2(ab+ac+bc)&=2(a^2+b^2+c^2)+2\end{align}
Now we need to find the value of $a^2+b^2+c^2$. 
We can do this as follows:
\begin{align}(a+b+c)^2&=2^2\\
a^2 + 2 a b + 2 a c + b^2 + 2 b c + c^2&=4\\
a^2+b^2+c^2+2(ab+ac+bc)&=4\\
a^2+b^2+c^2+2\times 1&=4\\
a^2+b^2+c^2&=2\end{align}
So now we can say that \begin{align}2(a^2+b^2+c^2)+2&=2\times 2+2\\
&=6\end{align}
</s>