<s>[INST] Ideals $(X^2+1)$ and $(X^2+1, 7)$ of polynomial ring $\mathbb{Z}[X]$ How can I show that generated ideals $(X^2+1)$ and $(X^2+1, 7)$ of  polynomial ring $\mathbb{Z}[X]$ are a prime ideal and a maximal ideal, respectively?
 [/INST] Hint
Are you able to check that
$$\Bbb{Z}[x]/\langle x^2+1, 7\rangle =\{ax+b\, | \, a,b \in \Bbb{Z}_7, \, x^2+1 \equiv 0\}?$$
This is a finite set with $7^2=49$ elements. If you want to check this is a field, you need to check the properties that define a field. One such property is to see if this has any zero divisor (finite integral domain is a field).
\begin{align*}
(ax+b)(cx+d) \equiv 0 \\
acx^2+(ad+bc)x+bd \equiv 0 \\
(ad+bc)x+(bd-ac) \equiv 0 && (\because x^2 \equiv -1)
\end{align*}
This implies
\begin{align*}
ad+bc & \equiv 0 \pmod{7}\\
bd-ac& \equiv 0 \pmod{7}.
\end{align*}
Squaring and adding gives us
\begin{align*}
(ad+bc)^2+(bd-ac)^2 & \equiv 0 \pmod{7}\\
(ad)^2+(bc)^2+(bd)^2+(ac)^2 & \equiv 0 \pmod{7}\\
(a^2+b^2)(c^2 + d^2)& \equiv 0 \pmod{7}
\end{align*}
See if you can check that at least one of $ax+b$ or $cx+d$ has to be the zero element?
Similar approach can be helpful for the first part if you can show that
$$\Bbb{Z}[x]/\langle x^2+1\rangle =\{ax+b\, | \, a,b \in \Bbb{Z}, \, x^2+1 \equiv 0\}$$
</s>