Suppose $G$ is an abelian group with $mG=G$ for some $m\in \mathbb{Z}$. Show that every short exact sequence
$$0\to G\xrightarrow{f}E\xrightarrow{g}\Bbb Z_m\to 0$$
splits.
I know that ${\rm Ext}_\mathbb{Z}^1(\mathbb{Z}_m,G)=0$, then I deduce the long exact sequence
$$0\to{\rm Hom}_{\Bbb Z}(\Bbb Z_m, G)\xrightarrow{{\rm Hom}_{\Bbb Z}(G, f)}{\rm Hom}_{\Bbb Z}(\Bbb Z_m, E)\xrightarrow{{\rm Hom}_{\Bbb Z}(\Bbb Z_m, g)}{\rm Hom}_{\Bbb Z}(\Bbb Z_m, \Bbb Z_m)\to 0$$
I'm not sure how to put all together to get that the sequence splits.
Your proof (plus the hint in the comments) is more succint, but we can also do it explicitly:
Pick some lift $\widetilde{1}$ in $E$ of the element $1 \in \mathbb{Z}_m$. Now $m\widetilde{1}$ is in the kernel of $g$, so it's in the image of $f$; say it's $f(\alpha)$. By hypothesis, there is $\beta \in G$ with $m\beta = \alpha$.
The claim is then that the map $\phi: \mathbb{Z}_m \to E$ given by $\phi(j) = j(\widetilde{1} - f(\beta))$ is a splitting of this sequence. You need to check that $\phi(m) = 0$ (else the map wouldn't be well-defined) and that $g \phi$ is the identity map, both of which are straightforward.