Suppose I want to factor $P(x)=5x^2 -17x +6$.
- Set $5x^2 -17x +6 = 0 $
$5x^2 -17x +6 = 0 $
$\rightarrow 5x^2 -17x = -6$
$\rightarrow x(5x-17) = -6$
$\rightarrow x(5x-17) = -6$ $= (-2)(3) = (3) (-2) = (6)(-1) = (-1)(6)...$
By trial and error, find a solution : $x = 3$ ( since $3 ( (5\times3) - 17) = -6$). That is number $3$ is one value of $x$ that brings one of the desired pairs of factors, namely , the product : $(3)(-2)$.
So, by the factor theorem $(x-3)$ must be a factor of the the original quadratic trinomial.
So $P(x)= (x-3) Q(x)$ where $Q(x)$ is a polynomial of degree $(2-1) = 1$, hence linear. That is $ Q(x) = (ax+b)$.
Find coefficients $a$ and $b$ such that : $(x-3) ( ax+b) = P(x)=5x^2 -17x +6$.
If $(x-3) ( ax+b) = 5x^2 -17x +6$
then ( by developping the LHS) $ax^2= 5x^2$ implying $a = 5$ and $(-3)b=6$, implying $b=-2$.
- Hence : $Q(x)= ( 5x -2)$ and $P(x)= (x-3) ( 5x-2)$.
Obiusvly, you can factor with zuch method only the solutions belongs to $Z$ or $Q$. In yahat case is very simple to find a possible zero by trial and error. At the contrary, if you let $P(x)=x^2-4x+2$, you can't apply your method. Also, I advise you to check the Rational Root theorem.