Order of elements in group

Given $G$ is a group, and $ab=ba$ for $a,b\in G$, we know $o(a)=12,o(b)=18$, in order to calculate $o(ab),o(ab^2),o(a^2b^3)$.

Do we need to assume group is a cyclic group in order to use formula $o(g^k)\mathbb{gcd}(n,k)=n$ for $g$ is a generator and $n=|G|$ ?

Or is there some other way to calculate ? Because in the method above, we don't use value of $o(a),o(b)$ at all.

-
You would need to know the order of $g$ as an element of $G.$ – user17794 Oct 1 '12 at 15:25
This is impossible without more information. Knowing $o(a)$ and $o(b)$ is not enough to work out $o(ab)$. – Chris Eagle Oct 1 '12 at 15:26
@ChrisEagle could we say the most far position we can touch is a formula of $o(ab)=o(g^{k_1+k_2})=\frac{n}{gcd(n, k_1+k_2)}$ if assume group is cyclic, but what if general group. is there even a formula ? – Zuo Oct 1 '12 at 15:31
The best you can say is that $o(ab) \mid \mathrm{lcm}(o(a),o(b))$. If $\gcd(o(a),o(b))=1$ then you have equality. – JSchlather Oct 1 '12 at 16:03
With respect to the main question, you have to make use of the fact that the two commute. Cyclicity of the group is not a given so cannot be a solving device. But I agree with Chris Eagle, it seems impossible without more information as to the nature of the group. – Vishesh Oct 1 '12 at 16:15

For $ab$ we know that $(ab)^{36}=a^{36}b^{36}=1$ so $o(ab)|36$
Suppose $o(ab)=2$ then $(ab)^2=1 \implies (ab)^{12}=1\implies b^{12}=1$ and similarly for if $o(ab)=r$ for some $r|12$ (contradicts $o(b)=18$).
Suppose $o(ab)=9$ then $(ab)^9=1 \implies (ab)^{18}=1\implies a^{18}=a^6=1$ and similarly for if $o(ab)=r$ for some $r|18$ (contradicts $o(a)=12$).