So firstly, you want to set your equation to zero. You can do this by subtracting 40 on both sides of the equation.

Now, what two numbers add up to 6x and multiply to -40x^2? 10x and -4x. With this info, replace 6x with 10x and -4x:

Next, factor x^2-4x and 10x-40 separately. Make sure that what's inside the parentheses is the same:

Now you can rewrite the equation as:

Now using Zero Product Property, solve for x:


In short, x = -10 and 4.