In case each of the schemes $S_i$ is affine, and we consider only affine schemes of finite presentation over $S_i$, resp.\ $S$ this lemma is equivalent to Algebra, Lemma \ref{algebra-lemma-colimit-category-fp-algebras}. We claim that the affine case implies the lemma in general. \medskip\noindent Let us prove (3). Suppose given an index $i \in I$, schemes $X_i$, $Y_i$ of finite presentation over $S_i$ and a pair of morphisms $\varphi_i, \psi_i : X_i \to Y_i$. Assume that the base changes are equal: $\varphi_{i, S} = \psi_{i, S}$. We will use the notation $X_{i'} = X_{i, S_{i'}}$ and $Y_{i'} = Y_{i, S_{i'}}$ for $i' \geq i$. We also set $X = X_{i, S}$ and $Y = Y_{i, S}$. Note that according to Lemma \ref{lemma-scheme-over-limit} we have $X = \lim_{i' \geq i} X_{i'}$ and similarly for $Y$. Additionally we denote $\varphi_{i'}$ and $\psi_{i'}$ (resp.\ $\varphi$ and $\psi$) the base change of $\varphi_i$ and $\psi_i$ to $S_{i'}$ (resp.\ $S$). So our assumption means that $\varphi = \psi$. Since $Y_i$ and $X_i$ are of finite presentation over $S_i$, and since $S_i$ is quasi-compact and quasi-separated, also $X_i$ and $Y_i$ are quasi-compact and quasi-separated (see Morphisms, Lemma \ref{morphisms-lemma-finite-presentation-quasi-compact-quasi-separated}). Hence we may choose a finite affine open covering $Y_i = \bigcup V_{j, i}$ such that each $V_{j, i}$ maps into an affine open of $S$. As above, denote $V_{j, i'}$ the inverse image of $V_{j, i}$ in $Y_{i'}$ and $V_j$ the inverse image in $Y$. The immersions $V_{j, i'} \to Y_{i'}$ are quasi-compact, and the inverse images $U_{j, i'} = \varphi_i^{-1}(V_{j, i'})$ and $U_{j, i'}' = \psi_i^{-1}(V_{j, i'})$ are quasi-compact opens of $X_{i'}$. By assumption the inverse images of $V_j$ under $\varphi$ and $\psi$ in $X$ are equal. Hence by Lemma \ref{lemma-descend-opens} there exists an index $i' \geq i$ such that of $U_{j, i'} = U_{j, i'}'$ in $X_{i'}$. Choose an finite affine open covering $U_{j, i'} = U_{j, i'}' = \bigcup W_{j, k, i'}$ which induce coverings $U_{j, i''} = U_{j, i''}' = \bigcup W_{j, k, i''}$ for all $i'' \geq i'$. By the affine case there exists an index $i''$ such that $\varphi_{i''}|_{W_{j, k, i''}} = \psi_{i''}|_{W_{j, k, i''}}$ for all $j, k$. Then $i''$ is an index such that $\varphi_{i''} = \psi_{i''}$ and (3) is proved. \medskip\noindent Let us prove (2). Suppose given an index $i \in I$, schemes $X_i$, $Y_i$ of finite presentation over $S_i$ and a morphism $\varphi : X_{i, S} \to Y_{i, S}$. We will use the notation $X_{i'} = X_{i, S_{i'}}$ and $Y_{i'} = Y_{i, S_{i'}}$ for $i' \geq i$. We also set $X = X_{i, S}$ and $Y = Y_{i, S}$. Note that according to Lemma \ref{lemma-scheme-over-limit} we have $X = \lim_{i' \geq i} X_{i'}$ and similarly for $Y$. Since $Y_i$ and $X_i$ are of finite presentation over $S_i$, and since $S_i$ is quasi-compact and quasi-separated, also $X_i$ and $Y_i$ are quasi-compact and quasi-separated (see Morphisms, Lemma \ref{morphisms-lemma-finite-presentation-quasi-compact-quasi-separated}). Hence we may choose a finite affine open covering $Y_i = \bigcup V_{j, i}$ such that each $V_{j, i}$ maps into an affine open of $S$. As above, denote $V_{j, i'}$ the inverse image of $V_{j, i}$ in $Y_{i'}$ and $V_j$ the inverse image in $Y$. The immersions $V_j \to Y$ are quasi-compact, and the inverse images $U_j = \varphi^{-1}(V_j)$ are quasi-compact opens of $X$. Hence by Lemma \ref{lemma-descend-opens} there exists an index $i' \geq i$ and quasi-compact opens $U_{j, i'}$ of $X_{i'}$ whose inverse image in $X$ is $U_j$. Choose an finite affine open covering $U_{j, i'} = \bigcup W_{j, k, i'}$ which induce affine open coverings $U_{j, i''} = \bigcup W_{j, k, i''}$ for all $i'' \geq i'$ and an affine open covering $U_j = \bigcup W_{j, k}$. By the affine case there exists an index $i''$ and morphisms $\varphi_{j, k, i''} : W_{j, k, i''} \to V_{j, i''}$ such that $\varphi|_{W_{j, k}} = \varphi_{j, k, i'', S}$ for all $j, k$. By part (3) proved above, there is a further index $i''' \geq i''$ such that $$ \varphi_{j_1, k_1, i'', S_{i'''}}|_{W_{j_1, k_1, i'''} \cap W_{j_2, k_2, i'''}} = \varphi_{j_2, k_2, i'', S_{i'''}}|_{W_{j_1, k_1, i'''} \cap W_{j_2, k_2, i'''}} $$ for all $j_1, j_2, k_1, k_2$. Then $i'''$ is an index such that there exists a morphism $\varphi_{i'''} : X_{i'''} \to Y_{i'''}$ whose base change to $S$ gives $\varphi$. Hence (2) holds. \medskip\noindent Let us prove (1). Suppose given a scheme $X$ of finite presentation over $S$. Since $X$ is of finite presentation over $S$, and since $S$ is quasi-compact and quasi-separated, also $X$ is quasi-compact and quasi-separated (see Morphisms, Lemma \ref{morphisms-lemma-finite-presentation-quasi-compact-quasi-separated}). Choose a finite affine open covering $X = \bigcup U_j$ such that each $U_j$ maps into an affine open $V_j \subset S$. Denote $U_{j_1j_2} = U_{j_1} \cap U_{j_2}$ and $U_{j_1j_2j_3} = U_{j_1} \cap U_{j_2} \cap U_{j_3}$. By Lemmas \ref{lemma-descend-opens} and \ref{lemma-limit-affine} we can find an index $i_1$ and affine opens $V_{j, i_1} \subset S_{i_1}$ such that each $V_j$ is the inverse of this in $S$. Let $V_{j, i}$ be the inverse image of $V_{j, i_1}$ in $S_i$ for $i \geq i_1$. By the affine case we may find an index $i_2 \geq i_1$ and affine schemes $U_{j, i_2} \to V_{j, i_2}$ such that $U_j = S \times_{S_{i_2}} U_{j, i_2}$ is the base change. Denote $U_{j, i} = S_i \times_{S_{i_2}} U_{j, i_2}$ for $i \geq i_2$. By Lemma \ref{lemma-descend-opens} there exists an index $i_3 \geq i_2$ and open subschemes $W_{j_1, j_2, i_3} \subset U_{j_1, i_3}$ whose base change to $S$ is equal to $U_{j_1j_2}$. Denote $W_{j_1, j_2, i} = S_i \times_{S_{i_3}} W_{j_1, j_2, i_3}$ for $i \geq i_3$. By part (2) shown above there exists an index $i_4 \geq i_3$ and morphisms $\varphi_{j_1, j_2, i_4} : W_{j_1, j_2, i_4} \to W_{j_2, j_1, i_4}$ whose base change to $S$ gives the identity morphism $U_{j_1j_2} = U_{j_2j_1}$ for all $j_1, j_2$. For all $i \geq i_4$ denote $\varphi_{j_1, j_2, i} = \text{id}_S \times \varphi_{j_1, j_2, i_4}$ the base change. We claim that for some $i_5 \geq i_4$ the system $((U_{j, i_5})_j, (W_{j_1, j_2, i_5})_{j_1, j_2}, (\varphi_{j_1, j_2, i_5})_{j_1, j_2})$ forms a glueing datum as in Schemes, Section \ref{schemes-section-glueing-schemes}. In order to see this we have to verify that for $i$ large enough we have $$ \varphi_{j_1, j_2, i}^{-1}(W_{j_1, j_2, i} \cap W_{j_1, j_3, i}) = W_{j_1, j_2, i} \cap W_{j_1, j_3, i} $$ and that for large enough $i$ the cocycle condition holds. The first condition follows from Lemma \ref{lemma-descend-opens} and the fact that $U_{j_2j_1j_3} = U_{j_1j_2j_3}$. The second from part (1) of the lemma proved above and the fact that the cocycle condition holds for the maps $\text{id} : U_{j_1j_2} \to U_{j_2j_1}$. Ok, so now we can use Schemes, Lemma \ref{schemes-lemma-glue-schemes} to glue the system $((U_{j, i_5})_j, (W_{j_1, j_2, i_5})_{j_1, j_2}, (\varphi_{j_1, j_2, i_5})_{j_1, j_2})$ to get a scheme $X_{i_5} \to S_{i_5}$. By construction the base change of $X_{i_5}$ to $S$ is formed by glueing the open affines $U_j$ along the opens $U_{j_1} \leftarrow U_{j_1j_2} \rightarrow U_{j_2}$. Hence $S \times_{S_{i_5}} X_{i_5} \cong X$ as desired.