I have a group $G$ that has presentation $$\langle X, Y \mid X^p=Y^q=(XY)^r=1, XY=YX \rangle,$$ where $p$ is prime such that $p\leq q \leq r$. I need to show that if $p \nmid r$ then $G = C_b$ where $b =gcd(q,pr)$.
I prove it like this.
If $p \nmid r$, so $\exists \, s \in \mathbb{Z}$ such that $r=sp+d$, where $0<d<p$.
We have $1=(XY)^r=X^rY^r=X^dY^r$. Also $gcd(p,d)=1$, so $\exists$ $ u,v \in \mathbb{Z}$ such that $1=up+vd$. So $X=X^{up+vd}=X^{vd}=Y^{-rv}$. Hence $X$ can be written with some power of $Y$.
We also have $(XY)^r=1$. So $(XY)^{rp}=1$ this implies $Y^{rp}=1$ and we already have$Y^q=1$.
By substituting $X=Y^{-rv}$ in the presentation of a group G, we see that $X^p=Y^{-rvp}=(Y^{rp})^{-v}=1$ and $(XY)^r=Y^{r(1-rv)}$.
So how do I reduce to the presentation $G=\langle Y \mid Y^q=Y^{rp}=1 \rangle $ to prove that these are the only relations of this group? But we have an other relation $Y^{r(1-rv)}=1$. So how could prove $Y$ has order $b=\mathtt{gcd}(q,rp)$?
I know one way of proving is to find the $\rm{gcd}(pr,r(1-rv))=pr$, but for this, I need to show that $p|1-rv$ that I am unable to get.
Could anyone please help me in it?