[step:Translate Boolean names into $P$-names without changing valuation]It remains to prove the reverse inclusion. Let $\tau\in M$ be a $B$-name. We use the standard functional presentation of complete Boolean-valued names: after joining duplicate coefficients, $\tau$ is a function whose domain $\operatorname{dom}(\tau)$ is a set of smaller $B$-names and whose value $\tau(\rho)\in B$ is the Boolean coefficient attached to $\rho$. This is equivalent to the pair presentation of names, since a set of pairs can be replaced by the function assigning to each name the join of all Boolean coefficients paired with it.
Since $B=\operatorname{RO}(P)$ is a complete Boolean algebra and $M$ is a transitive model of ZFC, arbitrary joins of sets of elements of $B$ that belong to $M$ exist in $B\cap M$, and [Zorn's lemma](/theorems/1226) may be applied inside $M$ to set-sized partially ordered collections in $M$.
For each $\rho\in\operatorname{dom}(\tau)$ with $\tau(\rho)\neq 0_B$, define in $M$ the partially ordered collection $\mathcal{A}_{\tau,\rho}$ of all antichains $A\subset P$ such that
\begin{align*}
\forall p\in A\quad e(p)\le_B\tau(\rho),
\end{align*}
ordered by inclusion. This collection belongs to $M$, because $P$, $B$, $e$, $\tau$, $\rho$, and the Boolean order relation all belong to $M$. Every chain in $\mathcal{A}_{\tau,\rho}$ has union again an antichain satisfying the same bound below $\tau(\rho)$, so Zorn's lemma in $M$ gives a maximal member $A_{\tau,\rho}\subset P$.
We verify that this maximality gives the Boolean join
\begin{align*}
\bigvee_{p\in A_{\tau,\rho}}e(p)=\tau(\rho).
\end{align*}
The left-hand side is at most $\tau(\rho)$ because every $e(p)$ lies below $\tau(\rho)$. If the difference
\begin{align*}
c=\tau(\rho)\wedge\neg\bigvee_{p\in A_{\tau,\rho}}e(p)
\end{align*}
were non-zero, density of $e[P]$ in $B^+$ would give $q\in P$ with $e(q)\le_B c$. Then $q$ is incompatible in $P$ with every $p\in A_{\tau,\rho}$, because otherwise a common extension $r\le_P p,q$ would satisfy $0_B\neq e(r)\le_B e(p)\wedge e(q)$, contradicting $e(q)\le_B\neg e(p)$. Hence $A_{\tau,\rho}\cup\{q\}$ is a larger member of $\mathcal{A}_{\tau,\rho}$, contradicting maximality. Thus $c=0_B$, proving the displayed join equality. If $\tau(\rho)=0_B$, set $A_{\tau,\rho}=\varnothing$.
Define recursively a $P$-name $\tau^*\in M$ by
\begin{align*}
\tau^*=\{(\rho^*,p):\rho\in\operatorname{dom}(\tau)\text{ and }p\in A_{\tau,\rho}\}.
\end{align*}
We prove by induction on the rank of $\tau$ that
\begin{align*}
(\tau^*)^G=\tau^H.
\end{align*}
Fix a set $x$. By the valuation rule for Boolean names,
\begin{align*}
x\in\tau^H\iff \exists\rho\in\operatorname{dom}(\tau)\text{ such that }\tau(\rho)\in H\text{ and }x=\rho^H.
\end{align*}
For each $\rho$, we prove
\begin{align*}
\tau(\rho)\in H\iff \exists p\in A_{\tau,\rho}\text{ such that }e(p)\in H.
\end{align*}
If $e(p)\in H$ for some $p\in A_{\tau,\rho}$, then $e(p)\le_B\tau(\rho)$, so upward closure of $H$ gives $\tau(\rho)\in H$. Conversely, assume $\tau(\rho)\in H$. If $\tau(\rho)=0_B$, this contradicts propriety of $H$, so $\tau(\rho)\neq 0_B$. The set
\begin{align*}
C_{\tau,\rho}=\{\neg\tau(\rho)\}\cup\{e(p):p\in A_{\tau,\rho}\}
\end{align*}
is a maximal antichain of $B$ belonging to $M$, because the elements $e(p)$ for $p\in A_{\tau,\rho}$ are pairwise incompatible below $\tau(\rho)$ and their join is $\tau(\rho)$. Since $H$ is $M$-generic, it meets the dense downward closure of the maximal antichain $C_{\tau,\rho}$, using the standard maximal-antichain characterization of generic filters; equivalently, as $H$ is an ultrafilter, it contains exactly one member of $C_{\tau,\rho}$. It cannot contain $\neg\tau(\rho)$ because it contains $\tau(\rho)$ and is proper. Therefore $e(p)\in H$ for some $p\in A_{\tau,\rho}$.
Since $e(p)\in H$ is equivalent to $p\in G$, and the induction hypothesis gives $\rho^H=(\rho^*)^G$, we obtain
\begin{align*}
x\in\tau^H\iff \exists\rho\in\operatorname{dom}(\tau)\exists p\in A_{\tau,\rho}\text{ such that }p\in G\text{ and }x=(\rho^*)^G.
\end{align*}
The right-hand side is exactly $x\in(\tau^*)^G$. Therefore $\tau^H=(\tau^*)^G$ for every $B$-name $\tau\in M$, and so $M[H]\subseteq M[G]$.[/step]