Step 1: Identify constants $ a $ , $ b $ and $ c $.
$ a $ is a number in front of the $ x^2 $ term $ b $ is a number in front of the $ x $ term and $ c $ is a constant. In this case:
Step 2: Multiply the leading coefficient $\color{blue}{ a = 18 }$ by the constant term $\color{blue}{c = -18} $.
$$ a \cdot c = -324 $$Step 3: Find out two numbers that multiply to $ a \cdot c = -324 $ and add to $ b = -77 $.
Step 4: All pairs of numbers with a product of $ -324 $ are:
| PRODUCT = -324 | |
| -1 324 | 1 -324 |
| -2 162 | 2 -162 |
| -3 108 | 3 -108 |
| -4 81 | 4 -81 |
| -6 54 | 6 -54 |
| -9 36 | 9 -36 |
| -12 27 | 12 -27 |
| -18 18 | 18 -18 |
Step 5: Find out which factor pair sums up to $\color{blue}{ b = -77 }$
| PRODUCT = -324 and SUM = -77 | |
| -1 324 | 1 -324 |
| -2 162 | 2 -162 |
| -3 108 | 3 -108 |
| -4 81 | 4 -81 |
| -6 54 | 6 -54 |
| -9 36 | 9 -36 |
| -12 27 | 12 -27 |
| -18 18 | 18 -18 |
Step 6: Replace middle term $ -77 x $ with $ 4x-81x $:
$$ 18x^{2}-77x-18 = 18x^{2}+4x-81x-18 $$Step 7: Apply factoring by grouping. Factor $ 2x $ out of the first two terms and $ -9 $ out of the last two terms.
$$ 18x^{2}+4x-81x-18 = 2x\left(9x+2\right) -9\left(9x+2\right) = \left(2x-9\right) \left(9x+2\right) $$