If $b^2 - 4ac \geq 0$, then this gives you $4k^2 + 36 \geq 0$. What can you say about $k$ from here, considering that all the numbers appearing in the inequality are non-negative?
In general, what can you say about the roots of a quadratic $ax^2 + bx + c$, where $a > 0$ and $c \leq 0$ or where $a < 0$ and $c \geq 0$?
The key is that it must always have rational roots for any $p, q$.
Claim: Let $f(x) = x^2 + bx + c$, where $b$ and $c$ are rational numbers. If $f(x)$ satisfies the condition that for all rational numbers $r$, $f(r)$ is the square of a rational number, then $f(x)$ must be the square of a polynomial.
Proof: By completing the square, we simply need to consider polynomials of the form $x^2 + \frac{n}{m}$, where $m,n$ are integers and $\gcd(n,m) = 1$.
Consider $x = 0$ and $\frac{1}{m}$, which gives us $\frac{n}{m}$ and $\frac{1+mn}{m^2}$ are both squares of rational numbers. Multiplying both terms by $m^2$, we get that $mn$ and $mn+1$ are both integers that are squares of a rational number, hence they are perfect squares, so $mn=0$.
Since $m\neq 0$, hence $n=0$ and thus $f(x) = x^2$ and we are done. $_\square$
Corollary: $b=0$ or $1$.
Proof: Consider the polynomial $f(x) = \left( \frac{p}{q} \right)^2 + 2(1-2b) \frac{p}{q} + 1$. From the conditions, for rational numbers, this always evaluates to a rational square. Hence, we must have $ f(x) = (ax+b)^2$.
Comparing coefficients, we see that $ a ^2 = 1, b^2 = 1$, which implies that $f(x) = (x+1)^2 $ or $(x-1)^2$, which hence correspond to $b=0$ and $b=1$ respectively. $_\square$
Note: Franklin shows that the claim is true for all polynomials, though it uses more machinery.
Best Answer
In $x^2-px+q$, $p$ is the sum and $q$ the product of the roots, and the discriminant $D=p^2-4q$ is the square of the difference of the roots. It seems you want to minimize $|D|$.