If $gh = hg$ in a group and $|g|$ and $|h|$ are finite, is $|gh|$ finite too?

The relation $gh = hg$ means this group $G$ is commutative. $\langle g\rangle$ and $\langle h \rangle$ are cyclic subgroups of G. Still have no idea how to conclude $|gh|$ is finite.

-
HINT: If $gh=hg$, then can you rewrite $(gh)^n$ as a product of a power of $g$ and a power of $h$? – Arturo Magidin Feb 13 '12 at 4:27
Can you see what's the value of a power $(gh)^n$? – Mariano Suárez-Alvarez Feb 13 '12 at 4:27
Note: The condition $gh=hg$ does not mean that the group $G$ is commutative. It only means that $g$ and $h$ commute. It is perfectly possible for two elements in a noncommutative group to commute. – Arturo Magidin Feb 13 '12 at 4:30

Take powers of $gh$. The condition $gh = hg$ will tell you that $(gh)^n = g^n h^n$. If $g^m = e$ the identity, and if $h^n = e$, then we see that $gh^{mn} = g^{mn}h^{mn} = e$.
This alone is not enough. The more difficult part of the problem is to show that $(gh)^k \neq 1$ for $k=1,2,3\cdots ,mn-1.$ – Ragib Zaman Feb 13 '12 at 5:04
This alone is not enough to determine the order of $gh$, I agree. But the OP is only asking about showing that $gh$ has finite order, for which this is sufficient. – NKS Feb 13 '12 at 5:05