Is $(X^3 - 18X + 12, 5) \in \mathbb{Z}[X]$ a prime ideal? I'm trying to determine wheter $A = (X^3 - 18X + 12, 5)$ and $B = (X^3 - 18X + 12, X-1)$ is a prime ideal in $\mathbb{Z}[X]$ and $\mathbb{Q}[X]$. I know that $A = \mathbb{Q}[X]$ since I can make $\frac{1}{5}\cdot 5 = 1$, so it is not a prime ideal in $\mathbb{Q}[X]$. But with the other options, I'm stuck. I know that $X^3 -18X + 12$ is irreducible in both $\mathbb{Z}[X]$ and $\mathbb{Q}[X]$. I've tried to show that $A$ and $B$ are maximal ideals, by using the first isomorphism theorem. If $f$ is the natural map $\mathbb{Z}[X] \to \mathbb{Z}[X]/A$ (with kernel $A$), then $\mathbb{Z}[X]/A$ is isomorphic to $f[\mathbb{Z}[X]]$. But at this point I'm stuck, as I don't know what the image of $f$ is.

Hint: (1). $\mathbb Z[X]/A \cong \dfrac{\mathbb Z[X]/(5)}{A/(5)} \cong \mathbb Z_5[X]/(X^3 - 3X + 2)$ and $(X^3 - 3X + 2)$ is reducible in $\mathbb Z_5$ as it has a root in $\mathbb Z_5.$
(2). $\mathbb Z[X]/B \cong \dfrac{\mathbb Z[X]/(X-1)}{B/(X-1)} \cong \mathbb Z_5.$
