When $\mathbb Z_3[x]/\langle x^2+1\rangle$, why is $(2x^2 + 2x + 1 + \langle x^2+1\rangle) = (2x + 2 + \langle x^2+1\rangle)$?
I know $\langle x^2+1\rangle$ has $2x^2+2$ but I'm confused by the fact that how $(2x^2 + 2x + 1 + \langle x^2+1\rangle) = (2x + 2 + \langle x^2+1\rangle)$?
You're working modulo two things at once: mod 3 and mod $x^2+1$.
Replacing a $2$ with a $-1$ which is allowed because we're working mod 3, we have
$$2x^2+2x+1=-x^2+2x+1.$$
Adding $x^2+1$ which is allowed because we're working mod $x^2+1$, we have
$$-x^2+2x+1=2x+2$$
and we're done.