Factoring quadratics is a completely solved problem. Any polynomial of degree $n$ breaks into $n$ linear factors in the splitting field of its ring of coefficients. That’s cool, but in practice, it’s nice to have a direct way to break a quadratic in $\mathbb{Z}[x]/(x^{3})$ into its two linear factors without exactly solving for the roots.*
Say we have a quadratic $Ax^2+Bx+C$ with two solutions $x=-p/q$ and $x=-r/s$. Then we have the following:
$$ \left(x+\frac{p}{q}\right)\left(x+\frac{r}{s}\right)=0 $$
Multiplying by $qs$,
$$\left(qx+p\right)\left(sx+r\right)=0$$
Expanding,
$$qsx^2+(qr+ps)x+pr=0$$
Writing the equation in this form immediately gives the quadratic case of the rational root theorem. It is straightforward to extend the result to the general case. Constant factors clearly don’t matter, so this gives us the following system of equation involving the original coefficients:
$$\begin{aligned}
A&=qs\\
B&=qr+ps\\
C&=pr
\end{aligned}$$
This works for any solutions, but makes factoring trivial in the case of a rational root (i.e. $p$, $q$, $r$, and $s$ are integers).
Who cares?
Nobody cares about factoring quadratics over the integers in its own right. Factoring is a nuisance. Like many techniques people have developed over time (manual algebraic methods and computer algebra systems), the content of this post is designed precisely to AVOID having to spend time thinking about factoring by making it easier. The unfortunate reality is that a lot of mathematical analysis and problem solving involves a bunch of trivial algebraic manipulation. Sometimes, it’s just laborious enough to be annoying, but not enough to justify taking the time to open up a computer algebra system. In terms of productivity, this is deadweight loss, so its valuable to minimize it.