Suppose three points $(q_1,q_2,q_3)$ of abritrary masses $(m_1,m_2,m_3)$ are on a circunference with center at the origin, creating a triangle (non necessarily equilateral).
Suppose the the barycenter and the center of mass are in the origin. Prove that all masses are equal $m_1=m_2=m_3$, and prove that the triangle is equilateral.
I began by using the definition of barycenter $G = \frac{1}{3}(q_1+q_2+q_3)$
As the barycenter is in the origin, $G=0$, so I conclude that $q_1=-q_2-q_3$.
Then, as $m_1q_1+m_2-q_2+m_3q_3=0$ because the center os mass is in the origin, I followed that $$-m_1q_2-m_1q_3+m_2q_2+m_3q_3=0$$
Thus, $m_1=m_2=m_3$.
For a lemma I proved in class I concluded that the triangle is equilateral.
Now, my doubt:
First, I don't know if I forgot something, or I am using what I want to prove. Second, how do I prove the same thing por $n=4, 5$ making a square and a pentagon, respectively.
Your proof is incorrect. Your correctly find that $q_1=-q_2-q_3$ and then find that $$-m_1q_2-m_1q_3+m_2q_2+m_3q_3=0,$$ from which it follows that $$(m_2-m_1)q_2+(m_3-m_1)q_3=0.$$ But this does not imply that $m_1=m_2=m_3$.
The three points are contained in a plane, and the setup is invariant with respect to rotation or scaling, so without loss of generality we may take coordinates so that $q_1=(1,0)$. It follows that $q_2$ and $q_3$ are points on the unit circle.
Given that the barycenter is at the origin, we have $\tfrac13(q_1+q_2+q_3)=(0,0)$ and hence $q_2+q_3=(-1,0)$. Writing $q_2=(x_2,y_2)$ and $q_3=(x_3,y_3)$ we see that $y_2=-y_3$, and because $q_2$ and $q_3$ lie on the unit circle, it follows that $x_2^2=x_3^2$. Because $x_2+x_3=-1$ we see that $x_2=x_3=-\tfrac12$, which shows that the $q_i$ are the vertices of an equilateral triangle.
Now if $m_1$, $m_2$ and $m_3$ are weights such that $$m_1q_1+m_2q_2+m_3q_3=0,$$ then comparing $y$-coordinates shows that $m_2=m_3$. Next comparing $x$-coordinates shows that $m_1=\tfrac{m_2+m_3}{2}=m_2=m_3$.
For $n=4$ and $n=5$, it does not follow that the points are the vertices of a square or pentagon, respectively, or that the masses are equal.