$G$ abelian group with $\vert G\vert =mn$ and $\gcd(m,n)=1$.
Solution 1:
You already showed that $G^mG^n=G$, which implies that $|G^n|\cdot|G^m|\geq G$, and that $G^n$ is contained in the kernel of the morphism $g\to g^m$ whose image is $G^m$, which implies that $|G^n|\cdot|G^m|\leq G$. So in fact $|G^n|\cdot|G^m|=G$. But $|G_n|$ must also be relatively prime with $n$ (or its elements could not be in that kernel), and we must have $|G^n|=m$ and then $|G^m|=n$.
I'll add that what makes this all look a bit tricky is that the statement is not sufficiently general. The more general fact is that for relatively prime integers $m,n$ any Abelian group $G$ annihilated by (taking the power) $mn$ is the direct sum of its subgroups annihilated respectively by $m$ and by $n$. This is immediate from a Bezout relation $1=um+vn$: on one hand any $g=g^{um}g^{vn}$ is in the product of those subgroups, and on the other hand should it be in both at the same time then each of the factors $g^{um}$ and $g^{vn}$ is separately the identity, so $g$ is as well. The order of the subgroup annihilated by $m$ retains all prime factors of $|G|$ that divide $m$ (with there multiplicities) and the rest (those prime factors that divide $n$) goes into the order of the other subgroup.