$$f(x)=x^3+3x^3+2x+4$$ $$g(x)=x^2+1$$ in $\mathbb Z/5 \mathbb Z[x] $
I got $f(x)=g(x)(x^2+3x+1)+(5x+5)=g(x)(x^2+3x+1)$ as $5x+5->0$ in $\mathbb Z/5 \mathbb Z$, by long division
I am not sure how to do the long division in a ring/field, for example, if you are in $\mathbb Z/5 \mathbb Z[x] $ the remainder is $4x+9$ then can you reduce it to $4x+4$ or you have to reduce the whole term to $-1x+4$?