Finding the sum or difference of polynomials