Proof for maximal ideals in $\mathbb{Z}[x]$ [duplicate]

Since maximal ideals are prime ideals, and according to this post, it suffices to exclude the situation 2.(which is the only non-trivial case), i.e., we need to show that $(f(x))$ is not a maximal ideal when $f(x)$ is irreducible with $\deg(f(x))>1$.

To see this, note that if we assume that $(f(x))$ is a maximal ideal of $\mathbb Z[x]$, then there should not be any non-unit ideal in $\mathbb Z[x]$ containing $f(x)$.

However, consider $(p,f(x))\supsetneq (f(x))$ where $p$ is a prime such that $p$ does not divide the leading coefficient of $f(x)$. It is trivial to see that $(p,f(x))\ne\mathbb Z[x]$, since $$\frac{\mathbb Z[x]}{(p,f(x))}\cong\frac{\mathbb F_p[x]}{(f(x))}\ne 0.$$ Contradiction!