Let $a>1$ be postive integers and $q$ be a prime such that $$\left. q \,\middle|\, \frac{a^{a^k}-1}{a-1}\right.,$$ and $m(q)$ be the multiplicative order of $a$ modulo $q$. Prove or disprove $$m(q)=a^k$$
My idea: since $$a^{a^k}\equiv 1 \pmod q$$ and $(q,a)=1$, so $$m(q)=a^k$$ Is it right? Thanks.
That claim would benefit from a simple justification.
That aside, your question is really whether $a^x \equiv 1 \pmod q$ and $(q, a) = 1$ suffices for $m(q) = x$. If you go back to the definition of the multiplicative order, you should see how to construct a counterexample.