Factoring trinomials with a common factor