First, find two numbers that multiply to #-6# (the #c# value of the quadratic) and add up #-1# (the #b# value of the quadratic).
The two numbers are #-3# and #2#. Now, split #-x# into #-3x# and #2x#. Then, group together the two factors:
#color(white)=x^2-x-6#
#=x^2-3x+2x-6#
#=color(red)x*x-color(red)x*3+2x-6#
#=color(red)x*x-color(red)x*3+color(blue)2*x-color(blue)2*3#
#=color(red)x(x-3)+color(blue)2*x-color(blue)2*3#
#=color(red)x(x-3)+color(blue)2(x-3)#
#=(color(red)x+color(blue)2)(x-3)#
That's the factored quadratic.