Proving a quadratic equation identity Continued question here
I encountered this question:
For quadratic polynomials such as $x^2\pm5x\pm6$ or $x^3\pm5x\mp6$, can be factorised over the integers. The main problem is to find a generator which can generate every polynomial that have this identity.
What have I tried:
For $x^2\pm mx+n=(x\pm p)(x\pm q)$ and $x^2\pm mx-n=(x\pm s)(x\mp t)$, solving a simultaneous equation for $q$ and $s$, getting
$$q=\frac {t(p+t)} {p-t}$$
$$s=\frac {p(p+t)} {p-t}$$
and applying into the general equation getting
$$x^2+(\frac {p^2+t^2} {p-t})x+\frac {pt(p+t)} {p-t}$$
but it doesn't suit for every integer $p$ and $t$, how can we get furthur than that?
 A: Let $m$ and $n$ be two positive integers such that the two polynomials
$$x^2+mx+n\qquad\text{ and }\qquad x^2+mx-n,$$
both factor over the integers. Note that then also the two polynomials
$$x^2-mx+n\qquad\text{ and }\qquad x^2-mx-n,$$
factor over the integers. It means there exist integers $p$, $q$, $s$ and $t$ such that
\begin{eqnarray*}
x^2+mx+n&=&(x+p)(x+q)=x^2+(p+q)x+pq,\\
x^2+mx-n&=&(x+s)(x+t)=x^2+(s+t)x+st,\\
\end{eqnarray*}
and so in particular $m^2-4n$ and $m^2+4n$ are both perfect squares, because
\begin{eqnarray*}
m^2-4n&=&(p+q)^2-4pq=(p-q)^2,\\
m^2+4n&=&(s+t)^2-4st=(s-t)^2,\\
\end{eqnarray*}
and hence $(p-q)^2$, $m^2$ and $(s-t)^2$ are three perfect squares in arithmetic progression, with common difference $4n$. Conversely, if $a^2$, $b^2$ and $c^2$ are three perfect squares in arithmetic progression with common difference $4d$ then
\begin{eqnarray*}
p&=&-\frac{b-a}{2},\qquad\text{ and }\qquad q&=&-\frac{b+a}{2},\\
s&=&-\frac{b+c}{2},\qquad\text{ and }\qquad t&=&-\frac{b-c}{2},
\end{eqnarray*}
are integers satisfying
$$(x-p)(x-q)=x^2+bx+d,$$
$$(x-s)(x-t)=x^2+bx-d.$$
So your question is equivalent to characterizing all arithmetic progressions of perfect squares of length $3$. This was somewhat famously done by Fermat, see wikipedia, for example. The parametrization given there  yields the parametrization
\begin{eqnarray*}
m&=&u^2+v^2,\\
n&=&uv(u^2-v^2),
\end{eqnarray*}
of the coefficients of such polynomials. Here $u$ and $v$ range over the integers.
