Problem: Let $G$ be a group and $a , b \in G$ be such that
\[
ab = ba \text{ and } \gcd (o(a), o(b)) = 1,
\]
where $o(a)$ denotes the order of $a$. Then prove that $o(ab) = o(a) o(b)$.
Solution: Let us assume that $o(a) = m$, $o(b) = n$ and $o(ab) = k$. Then,
\[
a^m = e = b^n = (ab)^k.
\]
Since $a$ and $b$ commutes, we have
\begin{align*}
(ab)^k = a^k b^k & \implies a^k b^k = e \\
& \implies a^k = b^{-k} \\
& \implies a^{nk} = b^{-nk} = e \\
& \implies m \mid nk \\
& \implies m \mid k \quad (\text{ since } \gcd (m,n) = 1).
\end{align*}
Similarly,
\begin{align*}
b^k = a^{-k} & \implies b^{mk} = a^{-mk} = e \\
& \implies n \mid mk \\
& \implies n \mid k .
\end{align*}
Since $\gcd (m,n) = 1$ we must have $mn \mid k$.
We also have
\begin{align*}
(ab)^ {mn} = a^{mn} b^{mn} = e \implies k \mid mn.
\end{align*}
Since $m,n$ and $k$ are positive integers, we have $mn = k$ and therefore, we proved that
\[
o(ab) = o(a) o(b).
\]