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.