<s>[INST] If $a+b+c=k$ and $a^2+b^2+c^2 =2k$ what is the maximum value of $k$? $a,b,c$ are real numbers and they satisfy the following equations.
$a+b+c=k$
$a^2+b^2+c^2=2k$
Find the maximum value of $k$.
I tried substituting for k in the second equation from the first and got
$a^2+b^2+c^2=2(a+b+c)$
Rearranging the terms I got
$a^2-2a+b^2-2b+c^2-2c=0$
Adding 3 to both sides we get
$a^2-2a+1+b^2-2b+1+c^2-2c+1=3$
This can be simplified to the following
$(a-1)^2+(b-1)^2+(c-1)^2=3$
Therefore,
$0\leq(a-1)^2,(b-1)^2,(c-1)^2\leq3$
From here we can deduce the range of values that a,b,c can take as
$1-\sqrt{3}\leq a,b,c\leq1+\sqrt{3}$
I don't know know if this helps to answer the question.
 [/INST] Your ideas are good. You obtained $(a-1)^2 + (b-1)^2 + (c-1)^2 = 3$. That means there is a sphere around the point $(1,1,1)$ with radius $\sqrt{3}$ and the point $(a,b,c)$ is situated on that sphere.
The condition $a^2+b^2+c^2 = 2k$ tells us that the point $(a,b,c)$ lives on a sphere around the origin at distance $\sqrt{2k}$.
The point exists on both spheres simultaneously, hence ...? (what is the largest distance from the origin these spheres can intersect?)

2D analogue. The point $C$ in the picture corresponds to $(a,b)$. Then $2\sqrt{2} = \sqrt{2k}$ i.e $k=4$.

In the 3D case, we would have $2\sqrt{3} = \sqrt{2k}$, thus $k=6$.
</s>