x^2-5x-24=0
A quadratic of the form ax^2+bx+c can be factored by finding values j and k which satisfy two conditions, jk=ac and j+k=b, in this case:
ac=jk=-24 and b=j+k=-5, so j and k must be 3 and -8
Now replace bx with jx and kx in the original equation:
x^2+3x-8x-24=0 and factor 1st and 2nd pair of terms...
x(x+3)-8(x+3)=0 which is equal to:
(x+3)(x-8)=0 so
x=-3 and 8