[guided]The purpose of the induction is to choose images for the elements of $M$ one at a time, while ensuring that every finite initial tuple has exactly the same complete type in $N$ as the corresponding tuple in $M$.
For the first element, atomicity gives an isolating formula $\theta_1(x_1)$ for $\operatorname{tp}^M(a_1/\varnothing)$. Since $M \models \theta_1(a_1)$, the sentence $\exists x_1\,\theta_1(x_1)$ is true in $M$. Because $T$ is complete and $M \models T$, every sentence true in $M$ is a consequence of $T$. Thus
\begin{align*}
T \models \exists x_1\,\theta_1(x_1).
\end{align*}
Since $N \models T$, there is $b_1 \in N$ with
\begin{align*}
N \models \theta_1(b_1).
\end{align*}
Now suppose we have already chosen $\bar{b}_k = (b_1,\dots,b_k) \in N^k$ such that
\begin{align*}
N \models \theta_k(\bar{b}_k).
\end{align*}
We need to choose $b_{k+1}$ so that the longer tuple realizes the isolated type of $(a_1,\dots,a_k,a_{k+1})$. The formula $\theta_{k+1}(x_1,\dots,x_k,x_{k+1})$ isolates that longer type, and $M$ realizes it at $\bar{a}_{k+1}$. Therefore
\begin{align*}
M \models \exists x_{k+1}\,\theta_{k+1}(\bar{a}_k,x_{k+1}).
\end{align*}
The important point is that this existential statement depends only on the complete type of the prefix $\bar{a}_k$. Since $\theta_k$ isolates $\operatorname{tp}^M(\bar{a}_k/\varnothing)$, every formula true of $\bar{a}_k$ is forced by $T$ together with $\theta_k$. Applying this to the formula
\begin{align*}
\exists x_{k+1}\,\theta_{k+1}(x_1,\dots,x_k,x_{k+1}),
\end{align*}
we obtain
\begin{align*}
T \models \forall x_1\dots \forall x_k
\left(
\theta_k(x_1,\dots,x_k)
\to
\exists x_{k+1}\,\theta_{k+1}(x_1,\dots,x_k,x_{k+1})
\right).
\end{align*}
Since $N \models T$ and $\bar{b}_k$ realizes $\theta_k$, the displayed implication holds in $N$ at $\bar{b}_k$. Hence there exists $b_{k+1} \in N$ satisfying
\begin{align*}
N \models \theta_{k+1}(\bar{b}_k,b_{k+1}).
\end{align*}
This is exactly the extension needed for the induction.[/guided]