ax^2+bx+c. To factor you are looking for two values, j and k, which satisfy to conditions:
ac=jk and b=j+k. We have:
x^2-2x-24 so in this case j=-6 and k=4
Now you replace the single linear term (the bx one) with two linear terms (jx and kx) into the original expression:
x^2-6x+4x-24 now you can factor the first and second pair of terms...
x(x-6)+4(x-6) which is equal to:
(x+4)(x-6)