[step:Prove that partial isomorphisms preserve all formulas]Let $M,N \models T$. Let $A \subset M$ and $B \subset N$ be finitely generated $L$-substructures, and let
\begin{align*}
f: A \to B
\end{align*}
be an $L$-substructure isomorphism. We prove by induction on the complexity of an $L$-formula $\varphi(x_1,\dots,x_n)$ that for every tuple $a = (a_1,\dots,a_n) \in A^n$,
\begin{align*}
M \models \varphi(a_1,\dots,a_n)
\quad \Longleftrightarrow \quad
N \models \varphi(f(a_1),\dots,f(a_n)).
\end{align*}
For atomic formulas, this follows from the definition of an $L$-substructure isomorphism: terms evaluated at $a$ remain inside $A$, the map $f$ commutes with all function symbols, and $f$ preserves equality and all relation symbols. Boolean connectives are immediate from the induction hypothesis and the truth definitions for $\neg$, $\wedge$, and $\vee$.
It remains to treat existential formulas. Suppose
\begin{align*}
\varphi(x_1,\dots,x_n) := \exists y\, \theta(x_1,\dots,x_n,y).
\end{align*}
Assume first that $M \models \exists y\,\theta(a_1,\dots,a_n,y)$. Choose $c \in M$ such that
\begin{align*}
M \models \theta(a_1,\dots,a_n,c).
\end{align*}
By the forward extension property, there exist $d \in N$ and an isomorphism
\begin{align*}
g: \langle A \cup \{c\} \rangle_M \to \langle B \cup \{d\} \rangle_N
\end{align*}
such that $g|_A = f$ and $g(c)=d$. Since $\theta$ has lower complexity than $\varphi$, the induction hypothesis applied to $g$ gives
\begin{align*}
N \models \theta(f(a_1),\dots,f(a_n),d).
\end{align*}
Therefore
\begin{align*}
N \models \exists y\,\theta(f(a_1),\dots,f(a_n),y).
\end{align*}
The reverse implication is identical with the roles of $M,A,c$ and $N,B,d$ exchanged, using the backward extension property. Hence $f$ preserves $\varphi$.[/step]