I'm trying to prove this for a finite group $G$.
Along with the book's hint, I have the following proof:
Let $\operatorname{ord}(a)=n$. Then
$$(a^k)^n=a^{kn}=a^{nk}=(a^n)^k=e.$$
It follows that $kn$ is a multiple of $n$, so $kn=nb$ for an integer $b$. So, $k=b$.
But I'm not sure what $k=b$ gives me.