This is an old exam question I can't piece together.
Let $1\to H\to G\to K\to 1$ be an exact sequence of groups such that $K$ is cyclic of order $n$, and $H$ is a group of order $m$. Prove that if $n$ and $m$ are relatively prime, then the exact sequence is split.
My professor explained it quickly, and all I have copied down is $$ g^n=e,g^n\in H,(g^n)^m=e=g^{mn}, (g^m)^n=e. K\to G, \sigma\mapsto g^m, \sigma^i\mapsto g^{mi} $$
I can't decipher what the point of this is. We want to show that there is a retraction which gives the identity on $K$, so I think this is trying to show the existence of an element of order $n$ in $G$? Can anyone explain what is happening?
Yes, exactly, you want to find an element of order $n$ in $G$ that maps to a generator of $K$.
Let $f : G \to K$ be the map in the sequence.