factor trinomials by grouping