This is an exercise from a lecture on Introduction to group theory and it is given in the introductory part so I am not sure what methods to use to prove this. It is given right after an exercise that if $g^2=e$ for all $g \in G$ then $G$ is abelian, so I assume this problem can be solved with similar basic algebraic manipulations but I have got stuck on it.
Suppose that $g^3 = e$ for all $g \in G$ for a group $G$. Then show that $hgh^{-1}$ and $g$ commute for all $h,g \in G$.
I've been thinking about this problem for a while but I can't figure out a way to show this. I would greatly appreciate any help.