[tex]\bf f(x)=x^3-4x^2+x+6\\\\
-----------------------------\\\\
\begin{array}{l|lrrrrllllll}
3&&1&-4&1&6\\
&&&3&-3&-6\\
--&&--&--&--&--\\
&&1&-1&-2&0
\end{array}\impliedby x=3\implies (x-3)=0
\\\\\\
\textit{that give us the factors of }
\\\\\\
f(x)=(x-3)(x^2-x-2)\impliedby \textit{factoring the quadratic, we get}
\\\\\\
f(x)=(x-3)(x-2)(x+1)\impliedby \textit{setting f(x) to 0}
\\\\\\
0=(x-3)(x-2)(x+1)\implies
\begin{cases}
x-3=0\to &x=3\\
x-2=0\to &x=2\\
x+1=0\to &x=-1
\end{cases}[/tex]
so.... notice, using the p/q factors, we ended up using 3/1 or just 3, so the root of x = 3, which gives us the factor of x-3 then
then you factor the quadratic, then set f(x) to 0, and solve each for "x"