My professor was presenting the problem that a group $G$ that has 3 conjugacy classes has either order 3 or 6. In his proof he said it was "clear" that by the class equation $$\begin{eqnarray} |G|&=&|Z(g)|+\sum |G:C_G(g_i)|\\ &=&1+|G:C_G(g_1)|+|G:C_G(g_2)| \end{eqnarray}$$ where the last two terms are given by the other two conjugacy classes that are not contained in the center. Then he proceeds from there to show that $|G:C_G(g_1)| \left(1+|G:C_G(g_2)|\right) $ and $|G:C_G(g_2)| \left(1+|G:C_G(g_1)|\right) $ and asked us to finish the rest of the proof. I'm not quite clear on the second equality above or how to proceed from here. Any help would be great. Thanks!
Edit: Here is the full statement. Let $G$ be a group of order $n$ finite. Suppose that $G$ has 3 congruency classes. Then the order of $G$ is either $3$ or $6$ and hence isomorphic to $\mathbb{Z}/3\mathbb{Z}$ or $S_3$.