Let $F$ be a field and $p\in F[x]$ a polynomial. Then $\langle p(x)\rangle$ is maximal if and only if $p(x)$ is irreducible.
The proof goes as follow:
Suppose first that $\langle p(x)\rangle$ is a maximal ideal $\operatorname{in} F[x] .$ Clearly, $p(x)$ is neither the zero polynomial nor a unit in $F[x],$ because neither $\{0\}$ nor $F[x]$ is a maximal ideal in $F[x] .$ If $p(x)=g(x) h(x)$ is a factorization of $p(x)$ over $F,$ then $\langle p(x)\rangle \subset\langle g(x)\rangle \subset F[x] .$ Thus, $\langle p(x)\rangle=\langle g(x)\rangle$ or $F[x]=\langle g(x)\rangle$.
I don't understand from the factorization of $p(x)$, we can deduce the relationship between $\langle p(x)\rangle,\langle g(x)\rangle$ and $F[x]$