Let's look a bit more closely at the construction of $X_n$ and how it changes as we increase $n$. We have $X_n = \underline{\Spec}(\mathcal{A}_n)$ where $\mathcal{A}_n$ is the equalizer of $s_n^\sharp$ and $t_n^\sharp$ going from $g_{n , *}\mathcal{O}_{Y_n}$ to $h_{n, *}\mathcal{O}_{R_n}$. Here $g_n : Y_n = X' \amalg Z_n \to X$ and $h_n : R_n = Y_n \times_X Y_n \to X$ are the given morphisms. Let $\mathcal{I} \subset \mathcal{O}_X$ be the coherent sheaf of ideals corresponding to $Z$. Then $$ g_{n, *}\mathcal{O}_{Y_n} = f_*\mathcal{O}_{X'} \times \mathcal{O}_X/\mathcal{I}^n $$ Similarly, we have a decomposition $$ R_n = X' \times_X X' \amalg X' \times_X Z_n \amalg Z_n \times_X X' \amalg Z_n \times_X Z_n $$ As $Z_n \to X$ is a monomorphism, we see that $X' \times_X Z_n = Z_n \times_X X'$ and that this identification is compatible with the two morphisms to $X$, with the two morphisms to $X'$, and with the two morphisms to $Z_n$. Denote $f_n : X' \times_X Z_n \to X$ the morphism to $X$. Denote $$ \mathcal{A} = \text{Equalizer}( \xymatrix{ f_*\mathcal{O}_{X'} \ar@<1ex>[r] \ar@<-1ex>[r] & (f \times f)_*\mathcal{O}_{X' \times_X X'} } ) $$ By the remarks above we find that $$ \mathcal{A}_n = \text{Equalizer}( \xymatrix{ \mathcal{A} \times \mathcal{O}_X/\mathcal{I}^n \ar@<1ex>[r] \ar@<-1ex>[r] & f_{n, *}\mathcal{O}_{X' \times_X Z_n} } ) $$ We have canonical maps $$ \mathcal{O}_X \to \ldots \to \mathcal{A}_3 \to \mathcal{A}_2 \to \mathcal{A}_1 $$ of coherent $\mathcal{O}_X$-algebras. The statement of the lemma means that for $n$ large enough there exists an $m \geq 0$ such that the image of $\mathcal{A}_{n + m} \to \mathcal{A}_n$ is isomorphic to $\mathcal{O}_X$. This we may check \'etale locally on $X$. Hence by Properties of Spaces, Lemma \ref{spaces-properties-lemma-quasi-compact-affine-cover} we may assume $X$ is an affine Noetherian scheme. \medskip\noindent Since $X_n \to X$ is an isomorphism over $U$ we see that the kernel of $\mathcal{O}_X \to \mathcal{A}_n$ is supported on $|Z|$. Since $X$ is Noetherian, the sequence of kernels $\mathcal{J}_n = \Ker(\mathcal{O}_X \to \mathcal{A}_n)$ stabilizes (Cohomology of Spaces, Lemma \ref{spaces-cohomology-lemma-acc-coherent}). Say $\mathcal{J}_{n_0} = \mathcal{J}_{n_0 + 1} = \ldots = \mathcal{J}$. By Cohomology of Spaces, Lemma \ref{spaces-cohomology-lemma-power-ideal-kills-sheaf} we find that $\mathcal{I}^t \mathcal{J} = 0$ for some $t \geq 0$. On the other hand, there is an $\mathcal{O}_X$-algebra map $\mathcal{A}_n \to \mathcal{O}_X/\mathcal{I}^n$ and hence $\mathcal{J} \subset \mathcal{I}^n$ for all $n$. By Artin-Rees (Cohomology of Spaces, Lemma \ref{spaces-cohomology-lemma-Artin-Rees}) we find that $\mathcal{J} \cap \mathcal{I}^n \subset \mathcal{I}^{n - c}\mathcal{J}$ for some $c  \geq 0$ and all $n \gg 0$. We conclude that $\mathcal{J} = 0$. \medskip\noindent Pick $n \geq n_0$ as in the previous paragraph. Then $\mathcal{O}_X \to \mathcal{A}_n$ is injective. Hence it now suffices to find $m \geq 0$ such that the image of $\mathcal{A}_{n + m} \to \mathcal{A}_n$ is equal to the image of $\mathcal{O}_X$. Observe that $\mathcal{A}_n$ sits in a short exact sequence $$ 0 \to \Ker(\mathcal{A} \to f_{n, *}\mathcal{O}_{X' \times_X Z_n}) \to \mathcal{A}_n \to \mathcal{O}_X/\mathcal{I}^n \to 0 $$ and similarly for $\mathcal{A}_{n + m}$. Hence it suffices to show $$ \Ker(\mathcal{A} \to f_{n + m, *}\mathcal{O}_{X' \times_X Z_{n + m}}) \subset \Im(\mathcal{I}^n \to \mathcal{A}) $$ for some $m \geq 0$. To do this we may work \'etale locally on $X$ and since $X$ is Noetherian we may assume that $X$ is a Noetherian affine scheme. Say $X = \Spec(R)$ and $\mathcal{I}$ corresponds to the ideal $I \subset R$. Let $\mathcal{A} = \widetilde{A}$ for a finite $R$-algebra $A$. Let $f_*\mathcal{O}_{X'} = \widetilde{B}$ for a finite $R$-algebra $B$. Then $R \to A \subset B$ and these maps become isomorphisms on inverting any element of $I$. \medskip\noindent Note that $f_{n, *}\mathcal{O}_{X' \times_X Z_n}$ is equal to $f_*(\mathcal{O}_{X'}/I^n\mathcal{O}_{X'})$ in the notation used in Cohomology of Spaces, Section \ref{spaces-cohomology-section-theorem-formal-functions}. By Cohomology of Spaces, Lemma \ref{spaces-cohomology-lemma-ML-cohomology-powers-ideal} we see that there exists a $c \geq 0$ such that $$ \Ker(B \to \Gamma(X, f_*(\mathcal{O}_{X'}/I^{n + m + c}\mathcal{O}_{X'})) $$ is contained in $I^{n + m}B$. On the other hand, as $R \to B$ is finite and an isomorphism after inverting any element of $I$ we see that $I^{n + m}B \subset \Im(I^n \to B)$ for $m$ large enough (can be chosen independent of $n$). This finishes the proof as $A \subset B$.