[step:Show that terms evaluate identically in $A$ and in $M$]Fix $a = (a_1,\dots,a_n) \in |A|^n$. For every $L$-term $t(x_1,\dots,x_n)$, let $t^A(a) \in |A|$ denote the value of $t$ in $A$ at $a$, and let $t^M(a) \in |M|$ denote the value of $t$ in $M$ at the same tuple. We prove by induction on the construction of $t$ that
\begin{align*}
t^A(a) = t^M(a).
\end{align*}
If $t$ is the variable $x_i$ for some $i \in \{1,\dots,n\}$, then $t^A(a) = a_i = t^M(a)$. If $t$ is a constant symbol $c$ of $L$, then $c^A = c^M$ because $A$ is an $L$-substructure of $M$.
Now suppose $t$ has the form $f(t_1,\dots,t_m)$, where $f$ is an $m$-ary function symbol of $L$ and $t_1,\dots,t_m$ are $L$-terms. By the induction hypothesis,
\begin{align*}
t_j^A(a) = t_j^M(a)
\end{align*}
for each $j \in \{1,\dots,m\}$. Since $A$ is closed under the interpretations of function symbols and $f^A$ is the restriction of $f^M$ to $|A|^m$, we obtain
\begin{align*}
t^A(a)
&= f^A(t_1^A(a),\dots,t_m^A(a)) \\
&= f^M(t_1^A(a),\dots,t_m^A(a)) \\
&= f^M(t_1^M(a),\dots,t_m^M(a)) \\
&= t^M(a).
\end{align*}
This completes the induction on terms.[/step]