Answer :
factoring out x
x(-3x^2+15x+42) now factor parenthetical expression
x(-3x^2+21x-6x+42)
x(-3x(x-7)-6(x-7))
x(-3x-6)(x-7) we can factor out -3 from first parentheses
-3x(x+2)(x-7)
x(-3x^2+15x+42) now factor parenthetical expression
x(-3x^2+21x-6x+42)
x(-3x(x-7)-6(x-7))
x(-3x-6)(x-7) we can factor out -3 from first parentheses
-3x(x+2)(x-7)