The naive cotangent complex $\NL_{X_1/S_1}$ is defined in Modules, Definition \ref{modules-definition-cotangent-complex-morphism-ringed-topoi}. The equalities in the last statement of the lemma follow from the fact that $g^*$ is adjoint to $g_*$, the fact that $H^0(\NL_{X_1/S_1}) = \Omega_{X_1/S_1}$ (by construction of the naive cotangent complex) and the fact that $Lg^*$ is the left derived functor of $g^*$. Thus we will work with the groups $\Ext^k_{\mathcal{O}_{X_2}}(Lg^*\NL_{X_1/S_1}, \mathcal{G}_2)$, $k = 0, 1$ in the rest of the proof. We first argue that we can reduce to the case where the underlying topological spaces of all ringed spaces in the lemma is the same. \medskip\noindent To do this, observe that $g^{-1}\NL_{X_1/S_1}$ is equal to the naive cotangent complex of the homomorphism of sheaves of rings $g^{-1}f_1^{-1}\mathcal{O}_{S_1} \to g^{-1}\mathcal{O}_{X_1}$, see Modules, Lemma \ref{modules-lemma-pullback-NL}. Moreover, the degree $0$ term of $\NL_{X_1/S_1}$ is a flat $\mathcal{O}_{X_1}$-module, hence the canonical map $$ Lg^*\NL_{X_1/S_1} \longrightarrow g^{-1}\NL_{X_1/S_1} \otimes_{g^{-1}\mathcal{O}_{X_1}} \mathcal{O}_{X_2} $$ induces an isomorphism on cohomology sheaves in degrees $0$ and $-1$. Thus we may replace the Ext groups of the lemma with $$ \Ext^k_{g^{-1}\mathcal{O}_{X_1}}(g^{-1}\NL_{X_1/S_1}, \mathcal{G}_2) = \Ext^k_{g^{-1}\mathcal{O}_{X_1}}( \NL_{g^{-1}\mathcal{O}_{X_1}/g^{-1}f_1^{-1}\mathcal{O}_{S_1}}, \mathcal{G}_2) $$ The set of morphism of ringed spaces $X'_2 \to X'_1$ fitting into (\ref{equation-huge-1}) compatibly with $\nu$ is in one-to-one bijection with the set of homomorphisms of $g^{-1}f_1^{-1}\mathcal{O}_{S'_1}$-algebras $g^{-1}\mathcal{O}_{X'_1} \to \mathcal{O}_{X'_2}$ which are compatible with $f^\sharp$ and $\nu$. In this way we see that we may assume we have a diagram (\ref{equation-huge-2}) of sheaves on $X$ and we are looking to find a homomorphism of sheaves of rings $\mathcal{O}_{X'_1} \to \mathcal{O}_{X'_2}$ fitting into it. \medskip\noindent In the rest of the proof of the lemma we assume all underlying topological spaces are the same, i.e., we have a diagram (\ref{equation-huge-2}) of sheaves on a space $X$ and we are looking for homomorphisms of sheaves of rings $\mathcal{O}_{X'_1} \to \mathcal{O}_{X'_2}$ fitting into it. As ext groups we will use $\Ext^k_{\mathcal{O}_{X_1}}( \NL_{\mathcal{O}_{X_1}/\mathcal{O}_{S_1}}, \mathcal{G}_2)$, $k = 0, 1$. \medskip\noindent Step 1. Construction of the obstruction class. Consider the sheaf of sets $$ \mathcal{E} = \mathcal{O}_{X'_1} \times_{\mathcal{O}_{X_2}} \mathcal{O}_{X'_2} $$ This comes with a surjective map $\alpha : \mathcal{E} \to \mathcal{O}_{X_1}$ and hence we can use $\NL(\alpha)$ instead of $\NL_{\mathcal{O}_{X_1}/\mathcal{O}_{S_1}}$, see Modules, Lemma \ref{modules-lemma-NL-up-to-qis}. Set $$ \mathcal{I}' = \Ker(\mathcal{O}_{S'_1}[\mathcal{E}] \to \mathcal{O}_{X_1}) \quad\text{and}\quad \mathcal{I} = \Ker(\mathcal{O}_{S_1}[\mathcal{E}] \to \mathcal{O}_{X_1}) $$ There is a surjection $\mathcal{I}' \to \mathcal{I}$ whose kernel is $\mathcal{J}_1\mathcal{O}_{S'_1}[\mathcal{E}]$. We obtain two homomorphisms of $\mathcal{O}_{S'_2}$-algebras $$ a : \mathcal{O}_{S'_1}[\mathcal{E}] \to \mathcal{O}_{X'_1} \quad\text{and}\quad b : \mathcal{O}_{S'_1}[\mathcal{E}] \to \mathcal{O}_{X'_2} $$ which induce maps $a|_{\mathcal{I}'} : \mathcal{I}' \to \mathcal{G}_1$ and $b|_{\mathcal{I}'} : \mathcal{I}' \to \mathcal{G}_2$. Both $a$ and $b$ annihilate $(\mathcal{I}')^2$. Moreover $a$ and $b$ agree on $\mathcal{J}_1\mathcal{O}_{S'_1}[\mathcal{E}]$ as maps into $\mathcal{G}_2$ because the left hand square of (\ref{equation-huge-2}) is commutative. Thus the difference $b|_{\mathcal{I}'} - \nu \circ a|_{\mathcal{I}'}$ induces a well defined $\mathcal{O}_{X_1}$-linear map $$ \xi : \mathcal{I}/\mathcal{I}^2 \longrightarrow \mathcal{G}_2 $$ which sends the class of a local section $f$ of $\mathcal{I}$ to $a(f') - \nu(b(f'))$ where $f'$ is a lift of $f$ to a local section of $\mathcal{I}'$. We let $[\xi] \in \Ext^1_{\mathcal{O}_{X_1}}(\NL(\alpha), \mathcal{G}_2)$ be the image (see below). \medskip\noindent Step 2. Vanishing of $[\xi]$ is necessary. Let us write $\Omega = \Omega_{\mathcal{O}_{S_1}[\mathcal{E}]/\mathcal{O}_{S_1}} \otimes_{\mathcal{O}_{S_1}[\mathcal{E}]} \mathcal{O}_{X_1}$. Observe that $\NL(\alpha) = (\mathcal{I}/\mathcal{I}^2 \to \Omega)$ fits into a distinguished triangle $$ \Omega[0] \to \NL(\alpha) \to \mathcal{I}/\mathcal{I}^2[1] \to \Omega[1] $$ Thus we see that $[\xi]$ is zero if and only if $\xi$ is a composition $\mathcal{I}/\mathcal{I}^2 \to \Omega \to \mathcal{G}_2$ for some map $\Omega \to \mathcal{G}_2$. Suppose there exists a homomorphisms of sheaves of rings $\varphi : \mathcal{O}_{X'_1} \to \mathcal{O}_{X'_2}$ fitting into (\ref{equation-huge-2}). In this case consider the map $\mathcal{O}_{S'_1}[\mathcal{E}] \to \mathcal{G}_2$, $f' \mapsto b(f') - \varphi(a(f'))$. A calculation shows this annihilates $\mathcal{J}_1\mathcal{O}_{S'_1}[\mathcal{E}]$ and induces a derivation $\mathcal{O}_{S_1}[\mathcal{E}] \to \mathcal{G}_2$. The resulting linear map $\Omega \to \mathcal{G}_2$ witnesses the fact that $[\xi] = 0$ in this case. \medskip\noindent Step 3. Vanishing of $[\xi]$ is sufficient. Let $\theta : \Omega \to \mathcal{G}_2$ be a $\mathcal{O}_{X_1}$-linear map such that $\xi$ is equal to $\theta \circ (\mathcal{I}/\mathcal{I}^2 \to \Omega)$. Then a calculation shows that $$ b + \theta \circ d : \mathcal{O}_{S'_1}[\mathcal{E}] \to \mathcal{O}_{X'_2} $$ annihilates $\mathcal{I}'$ and hence defines a map $\mathcal{O}_{X'_1} \to \mathcal{O}_{X'_2}$ fitting into (\ref{equation-huge-2}). \medskip\noindent Proof of (2) in the special case above. Omitted. Hint: This is exactly the same as the proof of (2) of Lemma \ref{lemma-huge-diagram}.