solve (x-5)(x+2) = 3x+2

Here's what I got so far:

x^2 + 2x - 5x - 10 = 3x + 2

x^2 - 3x - 10 = 3x + 2

x^2 - 6x - 12 = 0

and then I don't know what to do next. Do you do (x ) (x )? I don't know how to figure out how to get the missing numbers.

I would also like to know how to solve these two:

5x = -2x^3

5x = 2x^3