I am trying to provide a solution to the following exercise. Please point out anything that you find wrong and/or bad.
Show that a cyclic group $G$ of order $n$ generated by an element $a$ can also be generated by $a^k$ if $k$ and $p$ are relatively prime.
MY ATTEMPT:
Any element of $G$ can be written as
$$a^x,\,1\leq x\leq n$$
We are trying to show the following
$$\left(a^k\right)^m=a^x\,\,\, (\textrm{mod}\,\,n)$$
where $k$ and $n$ are relatively prime, and $m$ is some integer less than $n$. By Bézout's Identity,
$$(k,n)=1\implies ak+bn=1$$
$$\begin{align*} \rightarrow (xa)k+(xb)n&=x\\ (m)k+(\beta)n&=x\\ (m)k&=(-\beta)n+x\\ mk&=\alpha n +x\\ &\\ \implies mk&=x\,\,\,(\textrm{mod}\,\,n) \end{align*} $$
We have found our integer $m$ that satisfies the equality. It is left to show that each $(a^k)^m$ for $1\leq m \leq n$ is a distinct member of $G$. Note that if $m\geq n$, then $m=qn+b$ for some positive integers $q$ and $b$, where $1\leq b \leq n$. This means that
$$\left(a^k\right)^m=\left(a^k\right)^{qn+b}=a^{(kq)n}a^{kb}=(e)a^{kb}=\left(a^k\right)^b$$
And so the situation is reduced back to the original one. Thus, because $(a^k)^m$ covers every element in $G$ for $1\leq m\leq n$, there is a bijection between the group generated by $a^k$ and $G$. $\blacksquare$.
Essentially correct.
Faster: Note that since $(k, n)=1$, $\exists p,q$ such that $pk + qn = 1$. But then $$ a^{pk + qn} = a \\ \implies a^{pk} \cdot a^{qn} = a $$ but $a^{qn} = 1$, so $$ a^{pk} = a, $$ and $a$ generates the cyclic group, so $a^k$ does too.