Set $Z = S \setminus V$. Choose affine opens $U_1, \ldots, U_m \subset S$ such that $Z \subset \bigcup_{l = 1, \ldots, m} U_l$. Consider the opens $$ V \subset V \cup U_1 \subset V \cup U_1 \cup U_2 \subset \ldots \subset V \cup \bigcup\nolimits_{l = 1, \ldots, m} U_l = S $$ If we can prove the lemma successively for each of the cases $$ V \cup U_1 \cup \ldots \cup U_l \subset V \cup U_1 \cup \ldots \cup U_{l + 1} $$ then the lemma will follow for $V \subset S$. In each case we are adding one affine open. Thus we may assume \begin{enumerate} \item $S = U \cup V$, \item $U$ affine open in $S$, \item $V$ quasi-compact open in $S$, and \item $V = \lim_i V_i$ with $(V_i, f_{ii'})$ an inverse system over a directed set $I$, each $f_{ii'}$ affine and each $V_i$ of finite type over $\mathbf{Z}$. \end{enumerate} Denote $f_i : V \to V_i$ the projections. Set $W = U \cap V$. As $S$ is quasi-separated, this is a quasi-compact open of $V$. By Lemma \ref{lemma-descend-opens} (and after shrinking $I$) we may assume that there exist opens $W_i \subset V_i$ such that $f_{ii'}^{-1}(W_{i'}) = W_i$ and such that $f_i^{-1}(W_i) = W$. Since $W$ is a quasi-compact open of $U$ it is quasi-affine. Hence we may assume (after shrinking $I$ again) that $W_i$ is quasi-affine for all $i$, see Lemma \ref{lemma-limit-quasi-affine}. \medskip\noindent Write $U = \Spec(B)$. Set $R = \Gamma(W, \mathcal{O}_W)$, and $R_i = \Gamma(W_i, \mathcal{O}_{W_i})$. By Lemma \ref{lemma-descend-section} we have $R = \colim_i R_i$. Now we have the maps of rings $$ \xymatrix{ B \ar[r]_s & R \\ & R_i \ar[u]_{t_i} } $$ We set $B_i = \{(b, r) \in B \times R_i \mid s(b) = t_i(t)\}$ so that we have a cartesian diagram $$ \xymatrix{ B \ar[r]_s & R \\ B_i \ar[u] \ar[r] & R_i \ar[u]_{t_i} } $$ for each $i$. The transition maps $R_i \to R_{i'}$ induce maps $B_i \to B_{i'}$. It is clear that $B = \colim_i B_i$. In the next paragraph we show that for all sufficiently large $i$ the composition $W_i \to \Spec(R_i) \to \Spec(B_i)$ is an open immersion. \medskip\noindent As $W$ is a quasi-compact open of $U = \Spec(B)$ we can find a finitely many elements $g_l \in B$, $l = 1, \ldots, m$ such that $D(g_l) \subset W$ and such that $W = \bigcup_{l = 1, \ldots, m} D(g_l)$. Note that this implies $D(g_l) = W_{s(g_l)}$ as open subsets of $U$, where $W_{s(g_l)}$ denotes the largest open subset of $W$ on which $s(g_l)$ is invertible. Hence $$ B_{g_l} = \Gamma(D(g_l), \mathcal{O}_U) = \Gamma(W_{s(g_l)}, \mathcal{O}_W) = R_{s(g_l)}, $$ where the last equality is Properties, Lemma \ref{properties-lemma-invert-f-sections}. Since $W_{s(g_l)}$ is affine this also implies that $D(s(g_l)) = W_{s(g_l)}$ as open subsets of $\Spec(R)$. Since $R = \colim_i R_i$ we can (after shrinking $I$) assume there exist $g_{l, i} \in R_i$ for all $i \in I$ such that $s(g_l) = t_i(g_{l, i})$. Of course we choose the $g_{l, i}$ such that $g_{l, i}$ maps to $g_{l, i'}$ under the transition maps $R_i \to R_{i'}$. Then, by Lemma \ref{lemma-descend-opens} we can (after shrinking $I$ again) assume the corresponding opens $D(g_{l, i}) \subset \Spec(R_i)$ are contained in $W_i$ for $l = 1, \ldots, m$ and cover $W_i$. We conclude that the morphism $W_i \to \Spec(R_i) \to \Spec(B_i)$ is an open immersion, see Lemma \ref{lemma-diagram}. \medskip\noindent By Lemma \ref{lemma-quasi-affine-finite-type-over-Z} we can write $B_i$ as a directed colimit of subalgebras $A_{i, p} \subset B_i$, $p \in P_i$ each of finite type over $\mathbf{Z}$ and such that $W_i$ is identified with an open subscheme of $\Spec(A_{i, p})$. Let $S_{i, p}$ be the scheme obtained by glueing $V_i$ and $\Spec(A_{i, p})$ along the open $W_i$, see Schemes, Section \ref{schemes-section-glueing-schemes}. Here is the resulting commutative diagram of schemes: $$ \xymatrix{ & & V \ar[lld] \ar[d] & W \ar[l] \ar[lld] \ar[d] \\ V_i \ar[d] & W_i \ar[l] \ar[d] & S \ar[lld] & U \ar[lld] \ar[l] \\ S_{i, p} & \Spec(A_{i, p}) \ar[l] } $$ The morphism $S \to S_{i, p}$ arises because the upper right square is a pushout in the category of schemes. Note that $S_{i, p}$ is of finite type over $\mathbf{Z}$ since it has a finite affine open covering whose members are spectra of finite type $\mathbf{Z}$-algebras. We define a preorder on $J = \coprod_{i \in I} P_i$ by the rule $(i', p') \geq (i, p)$ if and only if $i' \geq i$ and the map $B_i \to B_{i'}$ maps $A_{i, p}$ into $A_{i', p'}$. This is exactly the condition needed to define a morphism $S_{i', p'} \to S_{i, p}$: namely make a commutative diagram as above using the transition morphisms $V_{i'} \to V_i$ and $W_{i'} \to W_i$ and the morphism $\Spec(A_{i', p'}) \to \Spec(A_{i, p})$ induced by the ring map $A_{i, p} \to A_{i', p'}$. The relevant commutativities have been built into the constructions. We claim that $S$ is the directed limit of the schemes $S_{i, p}$. Since by construction the schemes $V_i$ have limit $V$ this boils down to the fact that $B$ is the limit of the rings $A_{i, p}$ which is true by construction. The map $\alpha : J \to I$ is given by the rule $j = (i, p) \mapsto i$. The open subscheme $V'_j$ is just the image of $V_i \to S_{i, p}$ above. The commutativity of the diagrams in (5) is clear from the construction. This finishes the proof of the lemma.