[proofplan]
We verify the ideal axioms directly from the definitions of the module annihilator and element annihilator. For $\operatorname{Ann}_R(M)$, subtraction follows from distributivity of the module action, left multiplication follows from associativity of scalar multiplication, and right multiplication follows because $rx$ is again an element of $M$. For $\operatorname{Ann}_R(m)$, the same subtraction and left multiplication arguments work at the fixed element $m$; in the commutative case, right multiplication is converted into left multiplication.
[/proofplan]
[step:Verify that the module annihilator is an additive subgroup of $R$]
Let $A=\operatorname{Ann}_R(M)$. Since $0_Rx=0_M$ for every $x \in M$, we have $0_R \in A$.
Let $a,b \in A$. For every $x \in M$, the distributive law for the left $R$-module $M$ gives
\begin{align*}
(a-b)x=ax-bx.
\end{align*}
Since $a,b \in A$, we have $ax=0_M$ and $bx=0_M$. Hence
\begin{align*}
(a-b)x=0_M-0_M=0_M.
\end{align*}
Thus $a-b \in A$. Therefore $A$ is an additive subgroup of $R$.
[guided]
Let
\begin{align*}
A=\operatorname{Ann}_R(M)=\{a \in R : ax=0_M \text{ for every } x \in M\}.
\end{align*}
To prove that $A$ is an additive subgroup of the additive group of $R$, it is enough to prove that $A$ is nonempty and closed under subtraction.
First, $A$ is nonempty. For every $x \in M$, the zero scalar $0_R$ acts by
\begin{align*}
0_Rx=0_M.
\end{align*}
Therefore $0_R \in A$.
Now let $a,b \in A$. We must prove that $a-b \in A$, which means proving that $(a-b)x=0_M$ for every $x \in M$. Fix an arbitrary $x \in M$. Since $M$ is a left $R$-module, scalar multiplication is distributive over addition in $R$, so
\begin{align*}
(a-b)x=ax-bx.
\end{align*}
Because $a \in A$, we have $ax=0_M$. Because $b \in A$, we have $bx=0_M$. Substituting these two equalities gives
\begin{align*}
(a-b)x=0_M-0_M=0_M.
\end{align*}
The element $x \in M$ was arbitrary, so $(a-b)x=0_M$ for every $x \in M$. Hence $a-b \in A$. Thus $A$ is an additive subgroup of $R$.
[/guided]
[/step]
[step:Check closure of the module annihilator under multiplication from both sides]
Let $A=\operatorname{Ann}_R(M)$, let $a \in A$, and let $r \in R$.
For every $x \in M$, associativity of the module action gives
\begin{align*}
(ra)x=r(ax).
\end{align*}
Since $a \in A$, $ax=0_M$, and therefore
\begin{align*}
(ra)x=r0_M=0_M.
\end{align*}
Thus $ra \in A$.
For right multiplication, again fix $x \in M$. Since $rx \in M$ and $a \in A$, we have
\begin{align*}
a(rx)=0_M.
\end{align*}
Associativity of the module action gives
\begin{align*}
(ar)x=a(rx)=0_M.
\end{align*}
Thus $ar \in A$. Hence $A$ is closed under left and right multiplication by arbitrary elements of $R$. Together with the previous step, $A=\operatorname{Ann}_R(M)$ is a two-sided ideal of $R$.
[/step]
[step:Verify that the annihilator of one element is a left ideal]
Fix $m \in M$, and let
\begin{align*}
B=\operatorname{Ann}_R(m)=\{a \in R : am=0_M\}.
\end{align*}
Since $0_Rm=0_M$, we have $0_R \in B$.
Let $a,b \in B$. By distributivity of the module action,
\begin{align*}
(a-b)m=am-bm.
\end{align*}
Since $am=0_M$ and $bm=0_M$, it follows that
\begin{align*}
(a-b)m=0_M.
\end{align*}
Hence $a-b \in B$.
Now let $r \in R$ and $a \in B$. By associativity of scalar multiplication,
\begin{align*}
(ra)m=r(am).
\end{align*}
Since $am=0_M$, we get
\begin{align*}
(ra)m=r0_M=0_M.
\end{align*}
Thus $ra \in B$. Therefore $B=\operatorname{Ann}_R(m)$ is a left ideal of $R$.
[/step]
[step:Use commutativity to obtain right multiplication closure for an element annihilator]
Assume now that $R$ is commutative. Fix $m \in M$, and let $B=\operatorname{Ann}_R(m)$. The previous step shows that $B$ is a left ideal of $R$.
Let $a \in B$ and $r \in R$. Since $R$ is commutative, $ar=ra$. Therefore
\begin{align*}
(ar)m=(ra)m.
\end{align*}
By left multiplication closure already proved in the previous step, $ra \in B$, so
\begin{align*}
(ra)m=0_M.
\end{align*}
Hence $(ar)m=0_M$, and therefore $ar \in B$. Thus $B$ is also closed under right multiplication by arbitrary elements of $R$. Consequently $\operatorname{Ann}_R(m)$ is a two-sided ideal of $R$ when $R$ is commutative.
[/step]