prove that $x^6=(ax)^3$ implies $x^3=e,\: \forall x\in G$ Let be $(G,\cdot)$ a group and $e$ the identity element.
Let be $a\in G$.
If $$x^6=(ax)^3,\:\forall x\in G$$
Then
$$x^3=e,\: \forall x\in G$$
What I did:
$$x^6=(ax)^3,\:\forall x\in G$$
$x \gets a^2$ then $a^3=e$.
$$x^6=(ax)^3,\:\forall x\in G \implies x^6=(xa)^3,\:\forall x\in G$$
so
$$(ax)^3=(xa)^3,\:\forall x\in G$$
How should I continue from here?

As @ancient mathematician hinted, for all $x\in G$
$$x^{24} = \left(x^6\right)^4 = (ax)^{12} = \dots = x^3\,,$$
so $x^{21}=e$.
What's more, since you proved $(ax)^3 = (xa)^3$, it follows that
$$x^3 = (a^{-1}xa)^3 = a^{-1}x^3a\,,$$
which implies that $\forall x\in G, x^3a = ax^3$.
Thus $x^{18}=(x^3)^6 = a^3x^9 = x^9$, so $x^9=e$.
Finally $e=x^{21}=x^3$ since $9+9+3=21$.
