q = 
      PolynomialQuotient[a = (x^3) - 2  (x^2) - 5  x + 7, b = x - 1, 
        x]

r = PolynomialRemainder[a, b, x]

res = q*b + r

res // Expand

q = 
      PolynomialQuotient[a = (∑_(k = 1)^5) (x^k) (y^(6 - k)), 
        b = (∑_(k = 1)^3) 2 k (x^k) (y^(3 - k)), x]

r = PolynomialRemainder[a, b, x]

res = q*b + r

res // Expand