We have, $$p(x)=ax^2+bx+c=ax^2+(a+p)x+(a+2p)$$

and thus, $$t+r+r\cdot t=-\frac{a+p}{a}+\frac{a+2p}{a}=\frac{p}{a}$$

then $p=a\cdot k$, $k=(t+r+t\cdot r) \in \Bbb Z$.

Then our polynomial becomes,$$p(x)=ax^2+a(1+k)x+a(1+2k)$$

$$t=\frac{-(1+k) \pm \sqrt{k^2-6k-3}}{2} \quad...(1)$$

So

$$k^2-6k-3=q^2 \Rightarrow (k-3)^2-12=q^2 \Rightarrow (k+q-3)(k-q-3)=12$$

and split $12$ as a product of two integer and find all possible values for $k$.

Take for example:

\begin{cases} k+q-3=6 \Rightarrow k+q=9 \\ k-q-3=2 \Rightarrow k-q=5 \end{cases}

Adding up both equations we get $2k=14 \Rightarrow k=7$

And back to $(1)$, we get $(t,r)=(-3,-5)$ or $(t,r)=(-5,-3)$.