We know that 6x(-7) is -42 and we also know that 6+(-7) is -1.
So we can write
[tex]x^2+6x-7x-42[/tex]
[tex]x(x+6)-7(x+6)[/tex]
[tex](x-7)(x+6)[/tex]
So our solutions are [tex]x=7,-6[/tex]