how to factor by grouping with 4 terms