You can prove this theorem by carefuly adjusting the arguments of the proof of Lemma \ref{lemma-morphism-ringed-etale-topoi-affines} to the global setting. However, we want to indicate how we can glue the result of that lemma to get a global morphism due to the rigidity provided by the result of Lemma \ref{lemma-2-morphism}. Unfortunately, this is a bit messy. \medskip\noindent Let us prove existence when $Y$ is affine. In this case choose an affine open covering $X = \bigcup U_i$. For each $i$ the inclusion morphism $j_i : U_i \to X$ induces a morphism of locally ringed topoi $(j_{i, small}, j_{i, small}^\sharp) : (\Sh(U_{i, \etale}), \mathcal{O}_{U_i}) \to (\Sh(X_\etale), \mathcal{O}_X)$ by Lemma \ref{lemma-morphism-locally-ringed}. We can compose this with $(g, g^\sharp)$ to obtain a morphism of locally ringed topoi $$ (g, g^\sharp) \circ (j_{i, small}, j_{i, small}^\sharp) : (\Sh(U_{i, \etale}), \mathcal{O}_{U_i}) \to (\Sh(Y_\etale), \mathcal{O}_Y) $$ see Modules on Sites, Lemma \ref{sites-modules-lemma-composition-morphisms-locally-ringed-topoi}. By Lemma \ref{lemma-morphism-ringed-etale-topoi-affines} there exists a unique morphism of schemes $f_i : U_i \to Y$ and a $2$-isomorphism $$ t_i : (f_{i, small}, f_{i, small}^\sharp) \longrightarrow (g, g^\sharp) \circ (j_{i, small}, j_{i, small}^\sharp). $$ Set $U_{i, i'} = U_i \cap U_{i'}$, and denote $j_{i, i'} : U_{i, i'} \to U_i$ the inclusion morphism. Since we have $j_i \circ j_{i, i'} = j_{i'} \circ j_{i', i}$ we see that \begin{align*} (g, g^\sharp) \circ (j_{i, small}, j_{i, small}^\sharp) \circ (j_{i, i', small}, j_{i, i', small}^\sharp) = \\ (g, g^\sharp) \circ (j_{i', small}, j_{i', small}^\sharp) \circ (j_{i', i, small}, j_{i', i, small}^\sharp) \end{align*} Hence by uniqueness (see Lemma \ref{lemma-faithful}) we conclude that $f_i \circ j_{i, i'} = f_{i'} \circ j_{i', i}$, in other words the morphisms of schemes $f_i = f \circ j_i$ are the restrictions of a global morphism of schemes $f : X \to Y$. Consider the diagram of $2$-isomorphisms (where we drop the components ${}^\sharp$ to ease the notation) $$ \xymatrix{ g \circ j_{i, small} \circ j_{i, i', small} \ar[rr]^{t_i \star \text{id}_{j_{i, i', small}}} \ar@{=}[d] & & f_{small} \circ j_{i, small} \circ j_{i, i', small} \ar@{=}[d] \\ g \circ j_{i', small} \circ j_{i', i, small} \ar[rr]^{t_{i'} \star \text{id}_{j_{i', i, small}}} & & f_{small} \circ j_{i', small} \circ j_{i', i, small} } $$ The notation $\star$ indicates horizontal composition, see Categories, Definition \ref{categories-definition-2-category} in general and Sites, Section \ref{sites-section-2-category} for our particular case. By the result of Lemma \ref{lemma-2-morphism} this diagram commutes. Hence for any sheaf $\mathcal{G}$ on $Y_\etale$ the isomorphisms $t_i : f_{small}^{-1}\mathcal{G}|_{U_i} \to g^{-1}\mathcal{G}|_{U_i}$ agree over $U_{i, i'}$ and we obtain a global isomorphism $t : f_{small}^{-1}\mathcal{G} \to g^{-1}\mathcal{G}$. It is clear that this isomorphism is functorial in $\mathcal{G}$ and is compatible with the maps $f_{small}^\sharp$ and $g^\sharp$ (because it is compatible with these maps locally). This proves the theorem in case $Y$ is affine. \medskip\noindent In the general case, let $V \subset Y$ be an affine open. Then $h_V$ is a subsheaf of the final sheaf $*$ on $Y_\etale$. As $g$ is exact we see that $g^{-1}h_V$ is a subsheaf of the final sheaf on $X_\etale$. Hence by Lemma \ref{lemma-support-subsheaf-final} there exists an open subscheme $W \subset X$ such that $g^{-1}h_V = h_W$. By Modules on Sites, Lemma \ref{sites-modules-lemma-localize-morphism-locally-ringed-topoi} there exists a commutative diagram of morphisms of locally ringed topoi $$ \xymatrix{ (\Sh(W_\etale), \mathcal{O}_W) \ar[r] \ar[d]_{g'} & (\Sh(X_\etale), \mathcal{O}_X) \ar[d]^g \\ (\Sh(V_\etale), \mathcal{O}_V) \ar[r] & (\Sh(Y_\etale), \mathcal{O}_Y) } $$ where the horizontal arrows are the localization morphisms (induced by the inclusion morphisms $V \to Y$ and $W \to X$) and where $g'$ is induced from $g$. By the result of the preceding paragraph we obtain a morphism of schemes $f' : W \to V$ and a $2$-isomorphism $t : (f'_{small}, (f'_{small})^\sharp) \to (g', (g')^\sharp)$. Exactly as before these morphisms $f'$ (for varying affine opens $V \subset Y$) agree on overlaps by uniqueness, so we get a morphism $f : X \to Y$. Moreover, the $2$-isomorphisms $t$ are compatible on overlaps by Lemma \ref{lemma-2-morphism} again and we obtain a global $2$-isomorphism $(f_{small}, (f_{small})^\sharp) \to (g, (g)^\sharp)$. as desired. Some details omitted.