That is true only if you are factoring a quadratic (degree 2) Trinomial (has three terms) and the lead coeffient is 1.

For degree 3 or larger if factoring by grouping isn't possible we need to use the rational roots theorem.

The rational roots theorem tells us that all of the zero must be the ratio of the factors constant term and the factors of the lead coeffient.

ie

so our constant term n=-12 and our lead term is a=1.

the factors of negative twelve are (plus or minus) 1,2,3,4,6,12

So the possiblities for the rational zero's are

so checking some of them from our list....

if we evaluate at 3 we get

so x=3 must be a zero and (x-3) is a factor

using polynomial long division or synthetic division you get

this can be factored again...