To show a certain ideal is maximal. I was asked the following question in my exam :
$R$ is a commutative ring with identity and $M$ is a maximal ideal of $R$. I needed to show that the ideal of $R[x]$ generated by $M$ and $x$, denoted as $(M,x)$ is maximal in $R[x]$.
My attempt : I kept trying to somehow have a homomorphism from $R$ to the quotient ring $R[x]/(M,x)$ whose kernel is $M$. If I would have succeeded, I could apply the 1st Isomorphism theorem which would imply that $R[x]/(M,x)$ is a field which in turn implies that $(M,x)$ is maximal. But, I kept struggling and couldn't come up with something constructive. Any help is appreciated. Thanks for your time.
 A: Consider the homomorphism
$$
R[x]\to R/M,\qquad f(x)\mapsto f(0)+M
$$
and compute its kernel and image.
A: Consider the morphism $f:R[x]\to R[x]/(M,x)$ and the inclusion $g:R\to R[x]$. Then, 
$$
\ker(f\circ g) = g^{-1}(\ker(f))= \ker(f)\cap R=(M,x)\cap R=M
$$
and as you explained, this gives you $R/M\cong R[x]/(M,x)$.
A: First we show $(M,x)$ is a proper ideal of $R[x]$.

Suppose instead that $(M,x) = (1)$.

Then $1 \in (M,x)$ implies $1 = m + xg(x)\;$for some $m \in M$, some $g \in R[x]$.

Since $M$ is maximal in $R,\, M$ is a proper ideal of $R$, hence $m \ne 1$.

Then 
\begin{align*}&1 = m + xg(x)\\[4pt]
\implies\;&1-m = xg(x)
\end{align*}
contradiction, since $xg(x)$ can't be a nonzero constant.
It follows that $(M,x)$ is a proper ideal of $R[x]$, as claimed.
Let $f \in R[x]\setminus(M,x)$.

Then to show $(M,x)$ is maximal in $R[x]$, it suffices to show $(M,x,f) = (1)$.

Letting $f(x) = r + xg(x)$, for some $r \in R$, some $g \in R[x]$, we can't have $r \in M$, else $f \in (M,x)$.

Since $M$ is maximal in $R$, it follows that as an ideal of $R,\,(M,r) =(1),],$ hence also $(M,r) = (1)$ as an ideal of $R[x]$.

Then
\begin{align*}
&f(x) = r + xg(x)\\[4pt]
\implies\;&r \in (x,f)\\[4pt]
\implies\;&r \in (M,x,f)\\[4pt]
\implies\;&(M,r) \subseteq (M,x,f)\\[4pt]
\implies\;&(M,x,f) = (1)
\end{align*}
It follows that $(M,x)$ is maximal in $R[x]$, as was to be shown.
