I want to solve the following quadratic Diophantine equation:
$$\frac{x(x-1)}{y(y-1)}=\frac{p}{q} \hspace{5 mm}, \hspace{5 mm}p\le q$$ For $p=1$ and $q=2$, it is easy to solve.
Let $y=x+z$. Then after some simplification we get
$x^2-(2z+1)x-(z^2-z)=0$
For integral solution, the discriminant of this equation must be a whole square. Hence
$8z^2+1=k^2$
Now it is a standard Pell's equation which can easily be solved. But for arbitrary $p$ and $q$, using similar approach I get
$(2pz+q-p)^2+4p(q-p)(z^2-z)=k^2$
I am stuck here. Can someone help me?