[proofplan]
We apply the [Cayley-Hamilton for Modules](/theorems/2933) theorem with $f = \operatorname{id}_M$. The hypothesis $\operatorname{id}_M(M) = M = \mathfrak{a}M$ is exactly the condition $f(M) \subseteq \mathfrak{a}M$ required by Cayley-Hamilton. The resulting polynomial relation, when specialised to $f = \operatorname{id}_M$, collapses to a scalar equation $(1 + a_1 + \dots + a_n) \operatorname{id}_M = 0$, from which we extract the desired element $a \in \mathfrak{a}$.
[/proofplan]
[step:Verify the hypotheses of the Cayley-Hamilton theorem for $f = \operatorname{id}_M$]
Set $f := \operatorname{id}_M: M \to M$. This is an $R$-linear map (since $\operatorname{id}_M(rm) = rm = r \cdot \operatorname{id}_M(m)$ for all $r \in R$, $m \in M$). We check the condition $f(M) \subseteq \mathfrak{a}M$: since $f = \operatorname{id}_M$, we have $f(M) = M$, and $\mathfrak{a}M = M$ by hypothesis, so $f(M) = M = \mathfrak{a}M \subseteq \mathfrak{a}M$. The module $M$ is finitely generated by hypothesis. All conditions of the [Cayley-Hamilton for Modules](/theorems/2933) theorem are satisfied.
[/step]
[step:Apply Cayley-Hamilton and simplify the polynomial relation]
By the [Cayley-Hamilton for Modules](/theorems/2933) theorem, there exist $n \geq 1$ and elements $a_1, \dots, a_n \in \mathfrak{a}$ such that
\begin{align*}
f^n + a_1 f^{n-1} + \dots + a_n \operatorname{id}_M = 0
\end{align*}
in $\operatorname{End}_R(M)$. Since $f = \operatorname{id}_M$, we have $f^k = \operatorname{id}_M$ for every $k \geq 0$. Substituting:
\begin{align*}
\operatorname{id}_M + a_1 \operatorname{id}_M + \dots + a_n \operatorname{id}_M = (1 + a_1 + \dots + a_n) \operatorname{id}_M = 0.
\end{align*}
[guided]
The Cayley-Hamilton theorem gives a polynomial relation of the form $f^n + a_1 f^{n-1} + \dots + a_n \operatorname{id}_M = 0$ for general $f$. When $f = \operatorname{id}_M$, every power $f^k = \operatorname{id}_M^k = \operatorname{id}_M$ collapses to the identity. So the sum becomes $(1 + a_1 + \dots + a_n)$ times $\operatorname{id}_M$. This scalar-times-identity equals the zero endomorphism precisely when the scalar annihilates every element of $M$.
[/guided]
[/step]
[step:Extract the element $a \in \mathfrak{a}$ with $am = m$ for all $m \in M$]
The equation $(1 + a_1 + \dots + a_n) \operatorname{id}_M = 0$ means that for every $m \in M$,
\begin{align*}
(1 + a_1 + \dots + a_n) m = 0,
\end{align*}
i.e., $m = -(a_1 + \dots + a_n) m$. Define $a := -(a_1 + \dots + a_n)$. Since $a_1, \dots, a_n \in \mathfrak{a}$ and $\mathfrak{a}$ is an ideal (hence closed under addition and negation), $a \in \mathfrak{a}$. For every $m \in M$:
\begin{align*}
am = -(a_1 + \dots + a_n) m = m.
\end{align*}
This completes the proof.
[guided]
The algebra is straightforward: $1 + a_1 + \dots + a_n$ annihilates $M$, so $(1 - (-a_1 - \dots - a_n))m = 0$, i.e., $m = (-a_1 - \dots - a_n)m$ for all $m$. Setting $a = -(a_1 + \dots + a_n)$ gives $am = m$ for all $m \in M$, and $a \in \mathfrak{a}$ because $\mathfrak{a}$ is an ideal of $R$ containing each $a_i$.
Note what the result says: the element $a$ acts as the identity on $M$. In general, $a \neq 1_R$; rather, $1 - a$ annihilates $M$. This formulation is the key input to Nakayama's Lemma: if $\mathfrak{a} \subseteq \operatorname{Jac}(R)$, then $1 - a$ is a unit in $R$, forcing $M = 0$.
[/guided]
[/step]