Let $G$ be the group presented by $G=\bigl\langle x,y,z\;\bigm|\; xy=yx,\;zxz^{-1}=x^my^n,\;zyz^{-1}=x^py^q\bigr\rangle.$
I would like to prove that for every $m,n,p,q$, $G$ is solvable.
What is my idea: call $d=mq-np$. First suppose that $d\neq0$. I think that in this case $G\cong (\mathbb{Z}[\frac{1}{d}])^2\rtimes_\varphi\mathbb{Z}$ (that is solvable), where $\varphi(1)(1,0)=(m,n)$ and $\varphi(1)(0,1)=(p,q)$; but I have some problems to find $\alpha,\beta$ such that $\alpha^d=x$ and $\beta^d=y$, could you help me?
Now suppose $d=0$, if $m=n=p=q=0$ then $G=\mathbb{Z}$ and it's solvable. Otherwise suppose $m\neq0$, I don't know how to continue now, I proved that in this case $x^p=y^m$ I don't know if this helps, any idea?
EDIT: in the second case we can also suppose $p\neq0$, in fact if $p=0$ then $q=0$ and so $zyz^{-1}=1$ that implies $y=1$ and so $G$ becomes $\langle x,z|zxz^{-1}=x^m\rangle$ that is isomorphic to $\mathbb{Z}[\frac{1}{m}]\rtimes\mathbb{Z}$ that is solvable.
EDIT EDIT: now suppose $n=0$ then $q=0$ so the group becomes $\langle x,y,z|xy=yx,zxz^{-1}=x^m,zyz^{-1}=x^p\rangle$ but I proved that $x^p=y^m$ and so in this case $G\cong(\mathbb{Z}[\frac{1}{m}])^2\rtimes\mathbb{Z}$ that is solvable, so we can assume $n,m,p,q\neq0$ (I really don't know if this is useful).