Let $G$ be a group of order $n$ and let $k$ be prime to $n$, show that $g(x) = x^k$ is one-to-one.
I started trying to prove this, and said:
If $g(x) = g(y)$ for some $x,y \in G$ then $x^k = y^k$. Also, since $n,k$ are prime we have that there are $a,b$ such that $an + bk = 1$. Also, we know that $x^n = y^n = 1$.
But I got stuck there. Somehow I need to use $an+bk = 1$ for some $a,b$ to come to the conclusion that $x=y$, no luck