The problem: Let $a$ and $b$ be commuting elements of a group $G$. Let ord($a$) $=m$ and ord($b$) $= n$; let lcm($m,n$) denote the least common multiple of $m$ and $n$.
Prove that there is an element $c$ in $G$ whose order is lcm($m,n$). (HINT: Use the facts that (1) If $m$ and $n$ are relatively prime, then ord($ab$) $=mn$, and (2) If ord($a$) $=km$, then ord($a^k$) $=m$. Let $c=a^ib$ where $a^i$ is a certain power of $a$.)
My thoughts: $ab$ wouldn't always work, since $a$ and $b$ could just be inverses of each other. Aside from that observation, I don't think I have a clue on how to do this problem.