Does anyone know of a much faster way to solve this polynomial question?
here is a trick: as the polynomial has leading coefficient 1 and degree 3 we have $$p(x)=(x+K)(x^2+x+1)+2x+3$$ Now use the fact that $$p(x)=x(x+3)g(x)+5(x+1)$$ $$p(0)=5(0+1)=5$$ $$K=2$$