Step 1: Group this into two groups:
[tex]h^3 + 2h^2-9h-18=(h^3 + 2h^2)+(-9h-18)[/tex]
When you do that, be sure to group the "–" into the group with the 9 and make sure there's "+" between the groups.
Step 2: Factor out the GCF from both individual groups:
[tex](h^3 + 2h^2)+(-9h-18) = h^2 (h+2) -9(h+2)[/tex]
Step 3: Notice both groups have that (h+2)? That's a new GCF between the two groups, so factor that out:
[tex]h^2 (h+2) -9(h+2) = (h+2)(h^2-9)[/tex]
Step 4: That [tex](h^2-9)[/tex] piece can be factored further, since it's a difference of squares:
[tex](h+2)(h^2-9) = (h+2)(h+3)(h-3)[/tex]
Now it's factored.