Show that the order of $a\times b$ is equal to $nm$ if gcd(n,m)=1 [duplicate]

$(G,*)$ is an abelian group and $a,b$ are elements of G. Let $n=ord(a)$ and $m=ord(b)$ in $G$. Show that the order of $a*b$ is equal to $nm$ if $gcd(n,m)=1$.

I have already proved that $ord(a*b)|nm$. But the other part is a problem.

Thanks


Note that if $\gcd(m,n)=1$ then $\text{lcm}(m,n)=mn$, so it suffices to show that $\text{ord}(a*b)$ is a multiple of $m$ and $n$.