The question is : A triangle is inscribed inside a circle of radius $1$. The maximum value of sum of squares of the sides of triangle is?
In the solution given for this question they have given to use vectors for finding it's solution and their answer is given as : take the vertices of triangle as $\vec a, \vec b, \vec c$. Then the sum of squares will be given as

But they have not explained how they got the inequality with $9$. Can someone please explain with all the required steps?
My guess would be to place the origin in the center of the circle. Then $$|\vec{a}|=|\vec{b}|=|\vec{c}|=1$$ Let $$\vec{a} + \vec{b} + \vec{c} = \vec{v}$$ If we square this equality, we get $$ \tag{1} \vec{a}^2 + \vec{b}^2 + \vec{c}^2 + 2(\vec{a},\vec{b})+2(\vec{b},\vec{c})+2(\vec{a},\vec{c}) = \vec{v}^2 $$ Hence, by moving the squares on one side, we get $$ \tag{2} \vec{a}^2 + \vec{b}^2 + \vec{c}^2 - \vec{v}^2 = -2(\vec{a},\vec{b})-2(\vec{b},\vec{c})-2(\vec{a},\vec{c}) $$ If, on the other hand, we expand the sum of the squares, we obtain $$|\vec{a}-\vec{b}|^2+|\vec{b}-\vec{c}|^2+|\vec{a}-\vec{c}|^2 = 2(\vec{a}^2 + \vec{b}^2 + \vec{c}^2) - 2(\vec{a},\vec{b})-2(\vec{b},\vec{c})-2(\vec{a},\vec{c})$$ Using the equality $(2)$, we get $$ |\vec{a}-\vec{b}|^2+|\vec{b}-\vec{c}|^2+|\vec{a}-\vec{c}|^2 = 3(\vec{a}^2 + \vec{b}^2 + \vec{c}^2) - \vec{v}^2=9-\vec{v}^2\le9$$