how to factor an expression with 3 terms