g) $G=(x^3+y^3)+(2xy-4x^2+7x+2y^2-4xy+7y)-(2y^2-2xy+2x^2+4y-8x+14)$$=(x+y)(x^2-xy+y^2)+[x(2y-4x+7)+y(2y-4x+7)]-2(x^2-xy+y^2+2y-4x+7)$
$=(x+y)(x^2-xy+y^2)+(x+y)(2y-4x+7)-2(x^2-xy+y^2+2y-4x+7)$
$=(x+y)(x^2-xy+y^2+2y-4x+7)-2(x^2-xy+y^2+2y-4x+7)$
$=(x+y-2)(x^2-xy+y^2+2y-4x+7)$