Use the foil method to expand (x-1)(x+2): x^2+2x-x-2=x^2+x-2.
x^2+x-2=18, subtract 18 from both sides so we can use the Zero Product Property:
x^2+x-20=0.
Factor: (x+5)(x-4)=0.
Use the zero product property so that x+5=0, and x-4=0.
x has two solutions, -5 and 4.