Let be $G$ a group with $x,y \in G$ such that $xy =yx$, $o(x) := m$ and $o(y) := n$. Compute $o(xy)$.
I know that a very similar question asked many times before (for example, 1, 2, 3, 4 and 5), but my question it's a little different since $m$ and $n$ not necessarily coprimes, i.e., $d := \text{gcd}(m,n) \neq 1$. I suppose that $o(xy) = \frac{mn}{d}$. I'm be able to prove that $o(xy) \leq \frac{mn}{d}$, it's just note that
$$(xy)^{\frac{mn}{d}} = x^{\frac{mn}{d}} y^{\frac{mn}{d}} = (x^m)^{\frac{n}{d}} (y^n)^{\frac{m}{d}} = (1)^{\frac{n}{d}} (1)^{\frac{m}{d}} = 1 \Longrightarrow o(xy) \vert \left( \frac{mn}{d} \right) \Longrightarrow o(xy) \leq \frac{mn}{d},$$
but I'm having difficult to prove the opposite inequality. I tried copy the proof given in 1 since $\gcd \left( \frac{m}{d}, n \right) = 1$, but it's fail here because it is used that $o(x) = m$ there, but $\frac{m}{d} \neq o(x)$ here.
I will appreciate if someone can give me some hint in order to prove the opposite inequality.