If $x^2 = y^3$ in $G$, find the order of the group $G$ The original question

An Abelien group $G$ is generated by $x$ and $y$, with $|x| = 16$, $|y| = 24$, $x^2 = y^3$. What is the order of G?

I only know that $|G|=k\times\text{lcm}(16,24)=48k$ but cannot go any further. I am not sure how to use $x^2=y^3$. From that we have $x^2y^{21} = x^{14}y^3=e$. 
Am I supposed to do some counting here? For example, since every element in $G$ is in form $x^a y^b$, we just need to consider how many pairs like $(a,b)$ give us distinct elements. First we have something like $16\times 24$, but we can make it smaller by noticing that, for example, $(1,1)=(3,22)=(15,4)$. Not sure if I'm heading the right way.
 A: If $G$ is an abelian group generated by $x$ of order 16 and $y$ of order 24, then there is a surjective homomorphism $\varphi:  \mathbb Z/16\mathbb Z \times \mathbb Z/24\mathbb Z \to G$ defined by $\varphi(a, b) = x^a y^b$.  The fact that $x^2 = y^3$ says that $(2,0)$ and $(0,3)$ map to the same element, so $(2,-3)$ is in $\ker \varphi$.  But $(2,-3)$ has order 8 in $\mathbb Z/16\mathbb Z \times \mathbb Z/24\mathbb Z$, so $\ker \varphi$ has order at least 8.
Since the order of $G$ must be $16 \cdot 24 / |\ker \varphi|$, we must have $|G| \leq 16 \cdot 24 / 8 = 48$.  But as you observed, the order of $G$ must be a multiple of 48, so in fact it is exactly 48. 
A: Since $G$ is abelian and you have the order of $x$ and $y$, you can think of the group as $\mathbb{Z}_{16} \times \mathbb{Z}_{24}$ with the extra condition that $x^2 = y^3$. But this is really just  $(\mathbb{Z}_{16} \times \mathbb{Z}_{24}) / \langle x^2y^{-3}\rangle$ or I suppose more properly it's $(\mathbb{Z}_{16} \times \mathbb{Z}_{24}) / \langle (2,-3)\rangle$. If you find the order of $(2,-3)$ in $\mathbb{Z}_{16} \times \mathbb{Z}_{24}$, you can use Lagrange's theorem to answer this question.
A: Alternative proof:  let $z = y^8$, which has order 3.  I claim that $G$ is generated by $x$ and $z$.  If so, then the order of $G$ is at most $|x| \cdot |z| = 48$, again using the fact that $G$ is abelian.  Then, since you observed the order is a multiple of 48, it must be exactly 48.
To prove that $x$ and $z$ generate $G$, you have to play around a little with the equation $x^2 = y^3$.  For example, write $y = y^9 \cdot y^{-8} = (y^3)^3 z^{-1} = (x^2)^3 z^{-1} = x^6 z^{-1}$.  Then any element of $G$ can be expressed in $x$'s and $z$'s using this equation.
