While it will not always be the case, start by assuming we are only dealing with integers and the factors of

#x^2+7x-18#

have the form

#(x+a)(x-b)# we know #a# and #-b# have different signs since their product is negative (#-18#)

We also know that #a# is greater than #b# since the coefficient of #x# is greater than zero.

There are only a limited number of possible integer values for #a# and #b# with #a>b# and #ab = 18#

#(a,b) = (18,1)# which would give #a-b = 17#; not what we want

#(a,b) = (9,2)# which would give #a-b = 7#; this matches the #x# coefficient of the given equation

#(a,b)= (6,3)# which would give #a-b=3#; not what we want

There are no other integer possibilities.

The factoring is

#(x+9)(x-2) = x^2 + 7x -18#

Since

#x^2 + 7x - 18 = 0#

either

#x+9 = 0# or #x-2=0#

So

either #x=-9# or #x=2#