Originally Posted by

**NonCommAlg** [so $\displaystyle mn \mid o(ab)$ and we also have $\displaystyle (ab)^{mn}=a^{mn}b^{mn}=1$ and so $\displaystyle o(ab) \mid mn.$ thus $\displaystyle o(ab)=mn=\text{lcm}(a,b).$] now we can prove the claim for the general case: clearly we may assume that $\displaystyle m \nmid n.$

let $\displaystyle \text{lcm}(m,n)=\prod_{j=1}^r p_j^{k_j}$ be the prime factorization of $\displaystyle \text{lcm}(m,n).$ let $\displaystyle A=\{j: \ p_j^{k_j} \mid m \} \neq \emptyset,$ because $\displaystyle m \nmid n.$ let $\displaystyle s=\prod_{j \in A} p_j^{k_j}$ and $\displaystyle t=\frac{\text{lcm}(m,n)}{s}.$ obviously $\displaystyle s \mid m, \ t \mid n,$ and $\displaystyle \gcd(s,t)=1.$ therefore,

since $\displaystyle o(a^{m/s})=s$ and $\displaystyle o(b^{n/t})=t,$ we have $\displaystyle o(a^{m/s}b^{n/t})=st=\text{lcm}(m,n).$