The given condition implies that $ \phi : x \to x^3 $ is an endomorphism of $ G $. On the other hand, $ \phi(x) = x^3 = e $ implies that $ x = e $ as the group cannot have an element of order 3, so $ \phi $ has trivial kernel, and is therefore an automorphism.
$ \mu(x) = g x g^{-1} $ is also an automorphism for any $ g $, which means that
$$ g x^3 g^{-1} = \mu(x^3) = \mu(x)^3 = \phi(\mu(x)) = \phi(g x g^{-1}) = g^3 x^3 g^{-3} $$
or $ x^3 g^2 = g^2 x^3 $, so that any square commutes with any cube, and therefore any element of the group $ G $ as $ \phi $ is surjective. Now, we have
$$ (xy)(xy)^2 = (xy)^3 = x^3 y^3 = x x^2 y y^2 = (xy)(x^2 y^2) $$
and cancellation yields that $ yx = xy $, as desired.