Assume (1). This means there exists a $g \in S$, $g \not \in \mathfrak q$ such that $R \to S_g$ is smooth. By Proposition \ref{proposition-smooth-formally-smooth} we know that $R \to S_g$ is formally smooth. Note that given any diagram as in (2) the map $S \to B$ factors automatically through $S_{\mathfrak q}$ and a fortiori through $S_g$. The formal smoothness of $S_g$ over $R$ gives us a morphism $S_g \to B'$ fitting into a similar diagram with $S_g$ at the upper left corner. Composing with $S \to S_g$ gives the desired arrow. In other words, we have shown that (1) implies (2). \medskip\noindent Clearly (2) implies (3) and (3) implies (4). \medskip\noindent Assume (4). We are going to show that (1) holds, thereby finishing the proof of the lemma. Choose a presentation $S = R[x_1, \ldots, x_n]/(f_1, \ldots, f_m)$. This is possible as $S$ is of finite type over $R$ and therefore of finite presentation (see Lemma \ref{lemma-Noetherian-finite-type-is-finite-presentation}). Set $I = (f_1, \ldots, f_m)$. Consider the naive cotangent complex $$ \text{d} : I/I^2 \longrightarrow \bigoplus\nolimits_{j = 1}^m S\text{d}x_j $$ of this presentation (see Section \ref{section-netherlander}). It suffices to show that when we localize this complex at $\mathfrak q$ then the map becomes a split injection, see Lemma \ref{lemma-smooth-at-point}. Denote $S' = R[x_1, \ldots, x_n]/I^2$. By Lemma \ref{lemma-differential-mod-power-ideal} we have $$ S \otimes_{S'} \Omega_{S'/R} = S \otimes_{R[x_1, \ldots, x_n]} \Omega_{R[x_1, \ldots, x_n]/R} = \bigoplus\nolimits_{j = 1}^m S\text{d}x_j. $$ Thus the map $$ \text{d} : I/I^2 \longrightarrow S \otimes_{S'} \Omega_{S'/R} $$ is the same as the map in the naive cotangent complex above. In particular the truth of the assertion we are trying to prove depends only on the three rings $R \to S' \to S$. Let $\mathfrak q' \subset R[x_1, \ldots, x_n]$ be the prime ideal corresponding to $\mathfrak q$. Since localization commutes with taking modules of differentials (Lemma \ref{lemma-differentials-localize}) we see that it suffices to show that the map \begin{equation} \label{equation-target-map} \text{d} : I_{\mathfrak q'}/I_{\mathfrak q'}^2 \longrightarrow S_{\mathfrak q} \otimes_{S'_{\mathfrak q'}} \Omega_{S'_{\mathfrak q'}/R} \end{equation} coming from $R \to S'_{\mathfrak q'} \to S_{\mathfrak q}$ is a split injection. \medskip\noindent Let $N \in \mathbf{N}$ be an integer. Consider the ring $$ B'_N = S'_{\mathfrak q'} / (\mathfrak q')^N S'_{\mathfrak q'} = (S'/(\mathfrak q')^N S')_{\mathfrak q'} $$ and its quotient $B_N = B'_N/IB'_N$. Note that $B_N \cong S_{\mathfrak q}/\mathfrak q^NS_{\mathfrak q}$. Observe that $B'_N$ is an Artinian local ring since it is the quotient of a local Noetherian ring by a power of its maximal ideal. Consider a filtration of the kernel $I_N$ of $B'_N \to B_N$ by $B'_N$-submodules $$ 0 \subset J_{N, 1} \subset J_{N, 2} \subset \ldots \subset J_{N, n(N)} = I_N $$ such that each successive quotient $J_{N, i}/J_{N, i - 1}$ has length $1$. (As $B'_N$ is Artinian such a filtration exists.) This gives a sequence of small extensions $$ B'_N  \to B'_N/J_{N, 1} \to B'_N/J_{N, 2} \to \ldots \to B'_N/J_{N, n(N)} = B'_N/I_N = B_N = S_{\mathfrak q}/\mathfrak q^NS_{\mathfrak q} $$ Applying condition (4) successively to these small extensions starting with the map $S \to B_N$ we see there exists a commutative diagram $$ \xymatrix{ S \ar[r] \ar[rd] & B_N  \\ R \ar[r] \ar[u] & B'_N \ar[u] } $$ Clearly the ring map $S \to B'_N$ factors as $S \to S_{\mathfrak q} \to B'_N$ where $S_{\mathfrak q} \to B'_N$ is a local homomorphism of local rings. Moreover, since the maximal ideal of $B'_N$ to the $N$th power is zero we conclude that $S_{\mathfrak q} \to B'_N$ factors through $S_{\mathfrak q}/(\mathfrak q)^NS_{\mathfrak q} = B_N$. In other words we have shown that for all $N \in \mathbf{N}$ the surjection of $R$-algebras $B'_N \to B_N$ has a splitting. \medskip\noindent Consider the presentation $$ I_N \to B_N \otimes_{B'_N} \Omega_{B'_N/R} \to \Omega_{B_N/R} \to 0 $$ coming from the surjection $B'_N \to B_N$ with kernel $I_N$ (see Lemma \ref{lemma-differential-seq}). By the above the $R$-algebra map $B'_N \to B_N$ has a right inverse. Hence by Lemma \ref{lemma-differential-seq-split} we see that the sequence above is split exact! Thus for every $N$ the map $$ I_N \longrightarrow B_N \otimes_{B'_N} \Omega_{B'_N/R} $$ is a split injection. The rest of the proof is gotten by unwinding what this means exactly. Note that $$ I_N = I_{\mathfrak q'}/ (I_{\mathfrak q'}^2 + (\mathfrak q')^N \cap I_{\mathfrak q'}) $$ By Artin-Rees (Lemma \ref{lemma-Artin-Rees}) we find a $c \geq 0$ such that $$ S_{\mathfrak q}/\mathfrak q^{N - c}S_{\mathfrak q} \otimes_{S_{\mathfrak q}} I_N = S_{\mathfrak q}/\mathfrak q^{N - c}S_{\mathfrak q} \otimes_{S_{\mathfrak q}} I_{\mathfrak q'}/I_{\mathfrak q'}^2 $$ for all $N \geq c$ (these tensor product are just a fancy way of dividing by $\mathfrak q^{N - c}$). We may of course assume $c \geq 1$. By Lemma \ref{lemma-differential-mod-power-ideal} we see that $$ S'_{\mathfrak q'}/(\mathfrak q')^{N - c}S'_{\mathfrak q'} \otimes_{S'_{\mathfrak q'}} \Omega_{B'_N/R} = S'_{\mathfrak q'}/(\mathfrak q')^{N - c}S'_{\mathfrak q'} \otimes_{S'_{\mathfrak q'}} \Omega_{S'_{\mathfrak q'}/R} $$ we can further tensor this by $B_N = S_{\mathfrak q}/\mathfrak q^N$ to see that $$ S_{\mathfrak q}/\mathfrak q^{N - c}S_{\mathfrak q} \otimes_{S'_{\mathfrak q'}} \Omega_{B'_N/R} = S_{\mathfrak q}/\mathfrak q^{N - c}S_{\mathfrak q} \otimes_{S'_{\mathfrak q'}} \Omega_{S'_{\mathfrak q'}/R}. $$ Since a split injection remains a split injection after tensoring with anything we see that $$ S_{\mathfrak q}/\mathfrak q^{N - c}S_{\mathfrak q} \otimes_{S_{\mathfrak q}} (\ref{equation-target-map}) = S_{\mathfrak q}/\mathfrak q^{N - c}S_{\mathfrak q} \otimes_{S_{\mathfrak q}/\mathfrak q^N S_{\mathfrak q}} (I_N \longrightarrow B_N \otimes_{B'_N} \Omega_{B'_N/R}) $$ is a split injection for all $N \geq c$. By Lemma \ref{lemma-split-injection-after-completion} we see that (\ref{equation-target-map}) is a split injection. This finishes the proof.