A few weeks ago I asked a question about finding the number of maximal ideals lying above $3\mathbb{Z}$ in $B$, where $B$ is the integral closure of $\mathbb{Z}$ in a splitting extension $E\supset\mathbb{Q}$ for the polynomial $f(x)=x^3+x+1$.
I'm reading over the following solution, but would like to ask a few follow up questions.
Since the discriminant of $f(x)$ is negative, two of the roots are complex conjugates, and since conjugation has order 2, the degree of the extension must be 6. Hence we may think of $E$ as adjoining two roots $a$ and $b$ of $f(x)$ to $\mathbb{Q}$, where $a$ satisfies $a^3+a+1$ and $b$ satisfies the polynomial $(x^3+x+1)/(x-a)=x^2+ax+a^2+1$.
So factor $(3)$ in $\mathbb{Z}[a]$ by factoring $x^3+x+1\pmod{3}$. Since there is one root modulo 3, it follows that $ x^3+x+1=(x-1)(x^2+x-1)\pmod{3} $ and so as we have seen, $(3)$ factors in $\mathbb{Z}[a]$ as $(3)=(3,a-1)(3,a^2+a-1)$.
Now since $a\equiv 1\mod (3,a-1)$, the polynomial $x^2+ax+a^2+1$ becomes $x^2+x+2$, which is irreducible modulo 3, and thus does not reduce further. Also, since $a^2=-a+1$ modulo this ideal, the polynomial can be further simplified to $x^2+ax-a+2$, so any root has for $ra+s$ for $r$ and $s$ integers modulo 3. This gives the set of equations $ \begin{align*} (ra + s)^2 + a(ra + s) - a + 2 = 0 &\iff r^2a^2 + 2ras + s^2 + ra^2 + sa - a + 2 = 0,\\ &\iff r^2(-a + 1) + 2ras + s^2 + r(-a + 1) + sa - a + 2 = 0. \end{align*} $ and so $-r^2 + r + s - 1 = 0$, and $r^2 + s^2 + r + 2 = 0 \pmod{3}$. This former equation implies $s\equiv (r+1)^2\pmod{3}$, and substituting into the second gives $r^2+(r+1)^4+r+2\equiv 0\pmod{3}$. This is true when $r=0$ and $s=1$, so $x=1$ is a root of $x^2+ax-a+2\mod(3,a^2+a-1)$. This in turn implies it factors as $x^2+ax-a+2=(x-1)(x+a+1)$.
Hence $(3, a^2 + a - 1) = (3, a^2 + a - 1, b - 1)(3, a^2 + a -1, b + a + 1)$, and hence there are three prime factors, and hence maximal ideals since $3\mathbb{Z}$ is maximal in $\mathbb{Z}$, lying above $3\mathbb{Z}$ in $\mathbb{Z}$.
I see that the $3\mathbb{Z}$ is the product of the $3$ factors found, but is there a more detailed explanation about why this immediately implies that there are $3$ maximal ideals lying above $3\mathbb{Z}$? I don't see how the conclusion follows so quickly. Would there need to be some uniqueness about this factoring for it to work as it does? Thank you kindly for your responses.