$$(Pt-q)(qt-r)=(qt^{2}+P)P$$
$P=\frac{-\sqrt{4qr-4tq^{2}+\left(rt\right)^{2}}-rt}{2}$
$P=\frac{\sqrt{4qr-4tq^{2}+\left(rt\right)^{2}}-rt}{2}$
$\left\{\begin{matrix}q=-\frac{\sqrt{r^{2}-4Prt^{2}-4tP^{2}}-r}{2t}\text{; }q=\frac{\sqrt{r^{2}-4Prt^{2}-4tP^{2}}+r}{2t}\text{, }&t\neq 0\\q=\frac{P^{2}}{r}\text{, }&t=0\text{ and }r\neq 0\\q\in \mathrm{C}\text{, }&t=0\text{ and }r=0\text{ and }P=0\end{matrix}\right.$