Isomorphisms of quotients of rings - need some help in understanding why Let $p$ be a prime number. Why do we have an isomorphism of rings:
\begin{align}
\frac{\mathbb{Z}[i]}{(p)} &\cong \frac{\mathbb{Z}[x]/(x^2+1)}{(p + (x^2+1))} \tag{1}\\
&\cong \frac{\mathbb{Z}[x]}{(p, x^2 + 1)}\tag{2} \\
&\cong \frac{\mathbb{Z}[x]/ (p)}{((x^2+1) + (p))} \tag{3}\\
&\cong \frac{\mathbb{Z}/p\mathbb{Z}[x]}{([1]_px^2 + [1]_p)}\tag{4}?
\end{align}
I know isomorphism theorems for rings.
I also know the definition of the ring of Gaussian integers in terms of quotient.
I know that $\mathbb{Z}/(p) \cong \mathbb{Z}/p\mathbb{Z}[x]$.
But I can't get my head around rest of the details.
I would be immensely greatful for an explanation! I feel truly lost at the moment when I try to understand this. 
 A: The first step is spelling out the definition of $\mathbb{Z}[i]$. As a ring, $\mathbb{Z}[i]$ is isomorphic to $\mathbb{Z}[x]/(x^2+1)$; if you're not convinced, show that $\mathbb{Z}[x] \to \mathbb{Z}[i], f \mapsto f(i)$ is a surjective morphism of rings whose kernel is $(x^2+1)$, and apply the first isomorphism theorem. Under this isomorphism, the image of $p$ is $p + (x^2+1) \in \mathbb{Z}[x]/(x^2+1)$.

The second step is the third isomorphism theorem. You have the ring $R = \mathbb{Z}[x]$ and two ideals: $I = (p, x^2+1)$ and $J = (x^2+1) \subset I$. The third isomorphism theorem tells you that $$(R/J)/(I/J) \cong R/I.$$
The ring $R/J$ is $\mathbb{Z}[x]/(x^2+1)$, the ring $R/I$ is $\mathbb{Z}[x]/(p, x^2+1)$, and the ideal $I/J \subset R/I$ is the ideal generated by $p + (x^2+1) \in \mathbb{Z}[x]/(x^2+1)$.

The third step is another application of the third isomorphism theorem, but this time $I = (p, x^2+1)$ and $J = (p) \subset I$, I'll let you fill in the details (it's very similar to the second step).

The fourth step is the fact that $\mathbb{Z}[x] / (p)$ is isomorphic to $(\mathbb{Z}/p\mathbb{Z})[x]$. To see this, define a morphism $\mathbb{Z}[x] \to (\mathbb{Z}/p\mathbb{Z})[x]$ given by reduction mod $p$ of the coefficients. Then this is a surjective ring morphism, and its kernel is the ideal generated by $(p) \subset \mathbb{Z}[x]$, so you can apply the first isomorphism theorem.
Under this isomorphism, the generator $x^2+1 + (p) \in \mathbb{Z}[x] / (p)$ of the ideal is sent to $[1]_p x^2 + [1]_p \in (\mathbb{Z}/p\mathbb{Z})[x]$.
(You said you already knew this one but for the sake of completeness I preferred to include it.)
