hcju/stacksqa huggingface dataset:
We may replace $X$ by a quasi-compact open neighbourhood of the support of $\mathcal{G}$, hence we may assume $X$ is Noetherian. In this case $X$ and $f$ are quasi-compact and quasi-separated. Choose an approximation $P \to \mathcal{F}$ by a perfect complex $P$ of the triple $(X, \mathcal{F}, -1)$, see Derived Categories of Spaces, Definition \ref{spaces-perfect-definition-approximation-holds} and Theorem \ref{spaces-perfect-theorem-approximation}). Then the induced map $$ \Hom_{\mathcal{O}_X}(\mathcal{F}, \mathcal{G}) \longrightarrow \Hom_{D(\mathcal{O}_X)}(P, \mathcal{G}) $$ is an isomorphism because $P \to \mathcal{F}$ induces an isomorphism $H^0(P) \to \mathcal{F}$ and $H^i(P) = 0$ for $i > 0$. Moreover, for any morphism $g : T \to B$ denote $h : X_T = T \times_B X \to X$ the projection and set $P_T = Lh^*P$. Then it is equally true that $$ \Hom_{\mathcal{O}_{X_T}}(\mathcal{F}_T, \mathcal{G}_T) \longrightarrow \Hom_{D(\mathcal{O}_{X_T})}(P_T, \mathcal{G}_T) $$ is an isomorphism, as $P_T = Lh^*P \to Lh^*\mathcal{F} \to \mathcal{F}_T$ induces an isomorphism $H^0(P_T) \to \mathcal{F}_T$ (because $h^*$ is right exact and $H^i(P) = 0$ for $i > 0$). Thus it suffices to prove the result for the functor $$ T \longmapsto \Hom_{D(\mathcal{O}_{X_T})}(P_T, \mathcal{G}_T). $$ By the Leray spectral sequence (see Cohomology on Sites, Remark \ref{sites-cohomology-remark-before-Leray}) we have $$ \Hom_{D(\mathcal{O}_{X_T})}(P_T, \mathcal{G}_T) = H^0(X_T, R\SheafHom(P_T, \mathcal{G}_T)) = H^0(T, Rf_{T, *}R\SheafHom(P_T, \mathcal{G}_T)) $$ where $f_T : X_T \to T$ is the base change of $f$. By Derived Categories of Spaces, Lemma \ref{spaces-perfect-lemma-base-change-RHom} we have $$ Rf_{T, *}R\SheafHom(P_T, \mathcal{G}_T) = Lg^*Rf_*R\SheafHom(P, \mathcal{G}). $$ By Derived Categories of Spaces, Lemma \ref{spaces-perfect-lemma-ext-perfect} the object $K = Rf_*R\SheafHom(P, \mathcal{G})$ of $D(\mathcal{O}_B)$ is perfect. This means we can apply Lemma \ref{lemma-cohomology-perfect-complex} as long as we can prove that the cohomology sheaf $H^i(Lg^*K)$ is $0$ for all $i < 0$ and $g : T \to B$ as above. This is clear from the last displayed formula as the cohomology sheaves of $Rf_{T, *}R\SheafHom(P_T, \mathcal{G}_T)$ are zero in negative degrees due to the fact that $R\SheafHom(P_T, \mathcal{G}_T)$ has vanishing cohomology sheaves in negative degrees as $P_T$ is perfect with vanishing cohomology sheaves in positive degrees.
We have already seen that $\mathit{Hom}(\mathcal{F}, \mathcal{G})$ satisfies the sheaf property. Hence it remains to show the following: Given an fpqc covering $\{T_i \to T\}_{i \in I}$ of schemes over $B$ and an $\mathcal{O}_{X_T}$-linear map $u : \mathcal{F}_T \to \mathcal{G}_T$ such that $u_{T_i}$ is an isomorphism for all $i$, then $u$ is an isomorphism. Since $\{X_i \to X_T\}_{i \in I}$ is an fpqc covering of $X_T$, see Topologies on Spaces, Lemma \ref{spaces-topologies-lemma-fpqc}, this follows from Descent on Spaces, Proposition \ref{spaces-descent-proposition-fpqc-descent-quasi-coherent}.
We show that $p$ is fibred in groupoids by checking conditions (1) and (2) of Categories, Definition \ref{categories-definition-fibred-groupoids}. Given an object $(T', g', \mathcal{F}')$ of $\Cohstack_{X/B}$ and a morphism $h : T \to T'$ of schemes over $S$ we can set $g = h \circ g'$ and $\mathcal{F} = (h')^*\mathcal{F}'$ where $h' : X_T \to X_{T'}$ is the base change of $h$. Then it is clear that we obtain a morphism $(T, g, \mathcal{F}) \to (T', g', \mathcal{F}')$ of $\Cohstack_{X/B}$ lying over $h$. This proves (1). For (2) suppose we are given morphisms $$ (h_1, \varphi_1) : (T_1, g_1, \mathcal{F}_1) \to (T, g, \mathcal{F}) \quad\text{and}\quad (h_2, \varphi_2) : (T_2, g_2, \mathcal{F}_2) \to (T, g, \mathcal{F}) $$ of $\Cohstack_{X/B}$ and a morphism $h : T_1 \to T_2$ such that $h_2 \circ h = h_1$. Then we can let $\varphi$ be the composition $$ (h')^*\mathcal{F}_2 \xrightarrow{(h')^*\varphi_2^{-1}} (h')^*(h_2)^*\mathcal{F} = (h_1)^*\mathcal{F} \xrightarrow{\varphi_1} \mathcal{F}_1 $$ to obtain the morphism $(h, \varphi) : (T_1, g_1, \mathcal{F}_1) \to (T_2, g_2, \mathcal{F}_2)$ that witnesses the truth of condition (2).
Consider two objects $x = (T, g, \mathcal{F})$ and $y = (T, h, \mathcal{G})$ of $\mathcal{X}$ over a scheme $T$. We have to show that $\mathit{Isom}_\mathcal{X}(x, y)$ is an algebraic space over $T$, see Algebraic Stacks, Lemma \ref{algebraic-lemma-representable-diagonal}. If for $a : T' \to T$ the restrictions $x|_{T'}$ and $y|_{T'}$ are isomorphic in the fibre category $\mathcal{X}_{T'}$, then $g \circ a = h \circ a$. Hence there is a transformation of presheaves $$ \mathit{Isom}_\mathcal{X}(x, y) \longrightarrow \text{Equalizer}(g, h) $$ Since the diagonal of $B$ is representable (by schemes) this equalizer is a scheme. Thus we may replace $T$ by this equalizer and the sheaves $\mathcal{F}$ and $\mathcal{G}$ by their pullbacks. Thus we may assume $g = h$. In this case we have $\mathit{Isom}_\mathcal{X}(x, y) = \mathit{Isom}(\mathcal{F}, \mathcal{G})$ and the result follows from Proposition \ref{proposition-isom}.
To prove that $\Cohstack_{X/B}$ is a stack in groupoids, we have to show that the presheaves $\mathit{Isom}$ are sheaves and that descent data are effective. The statement on $\mathit{Isom}$ follows from Lemma \ref{lemma-coherent-diagonal}, see Algebraic Stacks, Lemma \ref{algebraic-lemma-representable-diagonal}. Let us prove the statement on descent data. Suppose that $\{a_i : T_i \to T\}$ is an fppf covering of schemes over $S$. Let $(\xi_i, \varphi_{ij})$ be a descent datum for $\{T_i \to T\}$ with values in $\Cohstack_{X/B}$. For each $i$ we can write $\xi_i = (T_i, g_i, \mathcal{F}_i)$. Denote $\text{pr}_0 : T_i \times_T T_j \to T_i$ and $\text{pr}_1 : T_i \times_T T_j \to T_j$ the projections. The condition that $\xi_i|_{T_i \times_T T_j} = \xi_j|_{T_i \times_T T_j}$ implies in particular that $g_i \circ \text{pr}_0 = g_j \circ \text{pr}_1$. Thus there exists a unique morphism $g : T \to B$ such that $g_i = g \circ a_i$, see Descent on Spaces, Lemma \ref{spaces-descent-lemma-fpqc-universal-effective-epimorphisms}. Denote $X_T = T \times_{g, B} X$. Set $X_i = X_{T_i} = T_i \times_{g_i, B} X = T_i \times_{a_i, T} X_T$ and $$ X_{ij} = X_{T_i} \times_{X_T} X_{T_j} = X_i \times_{X_T} X_j $$ with projections $\text{pr}_i$ and $\text{pr}_j$ to $X_i$ and $X_j$. Observe that the pullback of $(T_i, g_i, \mathcal{F}_i)$ by $\text{pr}_0 : T_i \times_T T_j \to T_i$ is given by $(T_i \times_T T_j, g_i \circ \text{pr}_0, \text{pr}_i^*\mathcal{F}_i)$. Hence a descent datum for $\{T_i \to T\}$ in $\Cohstack_{X/B}$ is given by the objects $(T_i, g \circ a_i, \mathcal{F}_i)$ and for each pair $i, j$ an isomorphism of $\mathcal{O}_{X_{ij}}$-modules $$ \varphi_{ij} : \text{pr}_i^*\mathcal{F}_i \longrightarrow \text{pr}_j^*\mathcal{F}_j $$ satisfying the cocycle condition over (the pullback of $X$ to) $T_i \times_T T_j \times_T T_k$. Ok, and now we simply use that $\{X_i \to X_T\}$ is an fppf covering so that we can view $(\mathcal{F}_i, \varphi_{ij})$ as a descent datum for this covering. By Descent on Spaces, Proposition \ref{spaces-descent-proposition-fpqc-descent-quasi-coherent} this descent datum is effective and we obtain a quasi-coherent sheaf $\mathcal{F}$ over $X_T$ restricting to $\mathcal{F}_i$ on $X_i$. By Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-flat-permanence} we see that $\mathcal{F}$ is flat over $T$ and Descent on Spaces, Lemma \ref{spaces-descent-lemma-finite-presentation-descends} guarantees that $\mathcal{Q}$ is of finite presentation as an $\mathcal{O}_{X_T}$-module. Finally, by Descent on Spaces, Lemma \ref{spaces-descent-lemma-descending-property-proper} we see that the scheme theoretic support of $\mathcal{F}$ is proper over $T$ as we've assumed the scheme theoretic support of $\mathcal{F}_i$ is proper over $T_i$ (note that taking scheme theoretic support commutes with flat base change by Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-flat-pullback-support}). In this way we obtain our desired object over $T$.
Write $B(T)$ for the discrete category whose objects are the $S$-morphisms $T \to B$. Let $T = \lim T_i$ be a filtered limit of affine schemes over $S$. Assigning to an object $(T, h, \mathcal{F})$ of $\Cohstack_{X/B, T}$ the object $h$ of $B(T)$ gives us a commutative diagram of fibre categories $$ \xymatrix{ \colim \Cohstack_{X/B, T_i} \ar[r] \ar[d] & \Cohstack_{X/B, T} \ar[d] \\ \colim B(T_i) \ar[r] & B(T) } $$ We have to show the top horizontal arrow is an equivalence. Since we have assumed that $B$ is locally of finite presentation over $S$ we see from Limits of Spaces, Remark \ref{spaces-limits-remark-limit-preserving} that the bottom horizontal arrow is an equivalence. This means that we may assume $T = \lim T_i$ be a filtered limit of affine schemes over $B$. Denote $g_i : T_i \to B$ and $g : T \to B$ the corresponding morphisms. Set $X_i = T_i \times_{g_i, B} X$ and $X_T = T \times_{g, B} X$. Observe that $X_T = \colim X_i$ and that the algebraic spaces $X_i$ and $X_T$ are quasi-separated and quasi-compact (as they are of finite presentation over the affines $T_i$ and $T$). By Limits of Spaces, Lemma \ref{spaces-limits-lemma-descend-modules-finite-presentation} we see that $$ \colim \textit{FP}(X_i) = \textit{FP}(X_T). $$ where $\textit{FP}(W)$ is short hand for the category of finitely presented $\mathcal{O}_W$-modules. The results of Limits of Spaces, Lemmas \ref{spaces-limits-lemma-descend-flat} and \ref{spaces-limits-lemma-eventually-proper-support} tell us the same thing is true if we replace $\textit{FP}(X_i)$ and $\textit{FP}(X_T)$ by the full subcategory of objects flat over $T_i$ and $T$ with scheme theoretic support proper over $T_i$ and $T$. This proves the lemma.
Observe that the corresponding map $$ B(Y') \longrightarrow B(Y) \times_{B(Z)} B(Z') $$ is a bijection, see Pushouts of Spaces, Lemma \ref{spaces-pushouts-lemma-pushout-along-thickening-schemes}. Thus using the commutative diagram $$ \xymatrix{ \Cohstack_{X/B, Y'} \ar[r] \ar[d] & \Cohstack_{X/B, Y} \times_{\Cohstack_{X/B, Z}} \Cohstack_{X/B, Z'} \ar[d] \\ B(Y') \ar[r] & B(Y) \times_{B(Z)} B(Z') } $$ we see that we may assume that $Y'$ is a scheme over $B'$. By Remark \ref{remark-coherent-base-change} we may replace $B$ by $Y'$ and $X$ by $X \times_B Y'$. Thus we may assume $B = Y'$. In this case the statement follows from Pushouts of Spaces, Lemma \ref{spaces-pushouts-lemma-space-over-pushout-flat-modules}.
Observe that by Lemma \ref{lemma-coherent-RS-star} our stack in groupoids $\mathcal{X}$ satisfies property (RS*) defined in Artin's Axioms, Section \ref{artin-section-inf}. In particular $\mathcal{X}$ satisfies (RS). Hence all associated predeformation categories are deformation categories (Artin's Axioms, Lemma \ref{artin-lemma-deformation-category}) and the statement makes sense. \medskip\noindent In this paragraph we show that we can reduce to the case $B = \Spec(k)$. Set $X_0 = \Spec(k) \times_{g_0, B} X$ and denote $\mathcal{X}_0 = \Cohstack_{X_0/k}$. In Remark \ref{remark-coherent-base-change} we have seen that $\mathcal{X}_0$ is the $2$-fibre product of $\mathcal{X}$ with $\Spec(k)$ over $B$ as categories fibred in groupoids over $(\Sch/S)_{fppf}$. Thus by Artin's Axioms, Lemma \ref{artin-lemma-fibre-product-tangent-spaces} we reduce to proving that $B$, $\Spec(k)$, and $\mathcal{X}_0$ have finite dimensional tangent spaces and infinitesimal automorphism spaces. The tangent space of $B$ and $\Spec(k)$ are finite dimensional by Artin's Axioms, Lemma \ref{artin-lemma-finite-dimension} and of course these have vanishing $\text{Inf}$. Thus it suffices to deal with $\mathcal{X}_0$. \medskip\noindent Let $k[\epsilon]$ be the dual numbers over $k$. Let $\Spec(k[\epsilon]) \to B$ be the composition of $g_0 : \Spec(k) \to B$ and the morphism $\Spec(k[\epsilon]) \to \Spec(k)$ coming from the inclusion $k \to k[\epsilon]$. Set $X_0 = \Spec(k) \times_B X$ and $X_\epsilon = \Spec(k[\epsilon]) \times_B X$. Observe that $X_\epsilon$ is a first order thickening of $X_0$ flat over the first order thickening $\Spec(k) \to \Spec(k[\epsilon])$. Unwinding the definitions and using Lemma \ref{lemma-coherent-over-first-order-thickening} we see that $T\mathcal{F}_{\mathcal{X}_0, k, x_0}$ is the set of lifts of $\mathcal{G}_0$ to a flat module on $X_\epsilon$. By Deformation Theory, Lemma \ref{defos-lemma-flat-ringed-topoi} we conclude that $$ T\mathcal{F}_{\mathcal{X}_0, k, x_0} = \Ext^1_{\mathcal{O}_{X_0}}(\mathcal{G}_0, \mathcal{G}_0) $$ Here we have used the identification $\epsilon k[\epsilon] \cong k$ of $k[\epsilon]$-modules. Using Deformation Theory, Lemma \ref{defos-lemma-flat-ringed-topoi} once more we see that $$ \text{Inf}(\mathcal{F}_{\mathcal{X}, k, x_0}) = \Ext^0_{\mathcal{O}_{X_0}}(\mathcal{G}_0, \mathcal{G}_0) $$ These spaces are finite dimensional over $k$ as $\mathcal{G}_0$ has support proper over $\Spec(k)$. Namely, $X_0$ is of finite presentation over $\Spec(k)$, hence Noetherian. Since $\mathcal{G}_0$ is of finite presentation it is a coherent $\mathcal{O}_{X_0}$-module. Thus we may apply Derived Categories of Spaces, Lemma \ref{spaces-perfect-lemma-ext-finite} to conclude the desired finiteness.
Let $A$ be an $S$-algebra which is a complete local Noetherian ring with maximal ideal $\mathfrak m$ whose residue field $k$ is of finite type over $S$. We have to show that the category of objects over $A$ is equivalent to the category of formal objects over $A$. Since we know this holds for the category $\mathcal{S}_B$ fibred in sets associated to $B$ by Artin's Axioms,  Lemma \ref{artin-lemma-effective}, it suffices to prove this for those objects lying over a given morphism $\Spec(A) \to B$. \medskip\noindent Set $X_A = \Spec(A) \times_B X$ and $X_n = \Spec(A/\mathfrak m^n) \times_B X$. By Grothendieck's existence theorem (More on Morphisms of Spaces, Theorem \ref{spaces-more-morphisms-theorem-grothendieck-existence}) we see that the category of coherent modules $\mathcal{F}$ on $X_A$ with support proper over $\Spec(A)$ is equivalent to the category of systems $(\mathcal{F}_n)$ of coherent modules $\mathcal{F}_n$ on $X_n$ with support proper over $\Spec(A/\mathfrak m^n)$. The equivalence sends $\mathcal{F}$ to the system $(\mathcal{F} \otimes_A A/\mathfrak m^n)$. See discussion in More on Morphisms of Spaces, Remark \ref{spaces-more-morphisms-remark-reformulate-existence-theorem}. To finish the proof of the lemma, it suffices to show that $\mathcal{F}$ is flat over $A$ if and only if all $\mathcal{F} \otimes_A A/\mathfrak m^n$ are flat over $A/\mathfrak m^n$. This follows from More on Morphisms of Spaces, Lemma \ref{spaces-more-morphisms-lemma-flatness-over-Noetherian-ring}.
[First proof] This proof is based on the criterion of Artin's Axioms, Lemma \ref{artin-lemma-dual-openness}. Let $U \to S$ be of finite type morphism of schemes, $x$ an object of $\mathcal{X}$ over $U$ and $u_0 \in U$ a finite type point such that $x$ is versal at $u_0$. After shrinking $U$ we may assume that $u_0$ is a closed point (Morphisms, Lemma \ref{morphisms-lemma-point-finite-type}) and $U = \Spec(A)$ with $U \to S$ mapping into an affine open $\Spec(\Lambda)$ of $S$. Let $\mathcal{F}$ be the coherent module on $X_A = \Spec(A) \times_S X$ flat over $A$ corresponding to the given object $x$. \medskip\noindent According to Deformation Theory, Lemma \ref{defos-lemma-flat-ringed-topoi} we have an isomorphism of functors $$ T_x(M) = \Ext^1_{X_A}(\mathcal{F}, \mathcal{F} \otimes_A M) $$ and given any surjection $A' \to A$ of $\Lambda$-algebras with square zero kernel $I$ we have an obstruction class $$ \xi_{A'} \in \Ext^2_{X_A}(\mathcal{F}, \mathcal{F} \otimes_A I) $$ This uses that for any $A' \to A$ as above the base change $X_{A'} = \Spec(A') \times_B X$ is flat over $A'$. Moreover, the construction of the obstruction class is functorial in the surjection $A' \to A$ (for fixed $A$) by Deformation Theory, Lemma \ref{defos-lemma-functorial-ringed-topoi}. Apply Derived Categories of Spaces, Lemma \ref{spaces-perfect-lemma-compute-ext} to the computation of the Ext groups $\Ext^i_{X_A}(\mathcal{F}, \mathcal{F} \otimes_A M)$ for $i \leq m$ with $m = 2$. We find a perfect object $K \in D(A)$ and functorial isomorphisms $$ H^i(K \otimes_A^\mathbf{L} M) \longrightarrow \Ext^i_{X_A}(\mathcal{F}, \mathcal{F} \otimes_A M) $$ for $i \leq m$ compatible with boundary maps. This object $K$, together with the displayed identifications above gives us a datum as in Artin's Axioms, Situation \ref{artin-situation-dual}. Finally, condition (iv) of Artin's Axioms, Lemma \ref{artin-lemma-dual-obstruction} holds by  Deformation Theory, Lemma \ref{defos-lemma-verify-iv-ringed-topoi}. Thus Artin's Axioms, Lemma \ref{artin-lemma-dual-openness} does indeed apply and the lemma is proved.
Let $\{T_i \to T\}_{i \in I}$ be an fpqc covering of schemes over $S$. Set $X_i = X_{T_i} = X \times_S T_i$ and $\mathcal{F}_i = \mathcal{F}_{T_i}$. Note that $\{X_i \to X_T\}_{i \in I}$ is an fpqc covering of $X_T$ (Topologies on Spaces, Lemma \ref{spaces-topologies-lemma-fpqc}) and that $X_{T_i \times_T T_{i'}} = X_i \times_{X_T} X_{i'}$. Suppose that $\mathcal{F}_i \to \mathcal{Q}_i$ is a collection of elements of $\text{Q}_{\mathcal{F}/X/B}(T_i)$ such that $\mathcal{Q}_i$ and $\mathcal{Q}_{i'}$ restrict to the same element of $\text{Q}_{\mathcal{F}/X/B}(T_i \times_T T_{i'})$. By Remark \ref{remark-q-sheaf} we obtain a surjective map of quasi-coherent $\mathcal{O}_{X_T}$-modules $\mathcal{F}_T \to \mathcal{Q}$ whose restriction to $X_i$ recovers the given quotients. By Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-flat-permanence} we see that $\mathcal{Q}$ is flat over $T$. Finally, in the case of $\text{Q}^{fp}_{\mathcal{F}/X/B}$, i.e., if $\mathcal{Q}_i$ are of finite presentation, then Descent on Spaces, Lemma \ref{spaces-descent-lemma-finite-presentation-descends} guarantees that $\mathcal{Q}$ is of finite presentation as an $\mathcal{O}_{X_T}$-module.
Choose a scheme $U$ and a surjective \'etale morphism $p : U \to T$. Let $R = U \times_T U$ with projections $t, s : R \to U$. \medskip\noindent Let $v : T \to \text{Q}_{\mathcal{F}/X/B}$ be a natural transformation. Then $v(p)$ corresponds to a pair $(h_U, \mathcal{F}_U \to \mathcal{Q}_U)$ over $U$. As $v$ is a transformation of functors we see that the pullbacks of $(h_U, \mathcal{F}_U \to \mathcal{Q}_U)$ by $s$ and $t$ agree. Since $T = U/R$ (Spaces, Lemma \ref{spaces-lemma-space-presentation}), we obtain a morphism $h : T \to B$ such that $h_U = h \circ p$. By Descent on Spaces, Proposition \ref{spaces-descent-proposition-fpqc-descent-quasi-coherent} the quotient $\mathcal{Q}_U$ descends to a quotient $\mathcal{F}_T \to \mathcal{Q}$ over $X_T$. Since $U \to T$ is surjective and flat, it follows from Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-flat-permanence} that $\mathcal{Q}$ is flat over $T$. \medskip\noindent Conversely, let $(h, \mathcal{F}_T \to \mathcal{Q})$ be a pair over $T$. Then we get a natural transformation $v : T \to \text{Q}_{\mathcal{F}/X/B}$ by sending a morphism $a : T' \to T$ where $T'$ is a scheme to $(h \circ a, \mathcal{F}_{T'} \to a^*\mathcal{Q})$. We omit the verification that the construction of this and the previous paragraph are mutually inverse. \medskip\noindent In the case of $\text{Q}^{fp}_{\mathcal{F}/X/B}$ we add: given a morphism $h : T \to B$, a quasi-coherent sheaf on $X_T$ is of finite presentation as an $\mathcal{O}_{X_T}$-module if and only if the pullback to $X_U$ is of finite presentation as an $\mathcal{O}_{X_U}$-module. This follows from the fact that $X_U \to X_T$ is surjective and \'etale and Descent on Spaces, Lemma \ref{spaces-descent-lemma-finite-presentation-descends}.
Let $\mathcal{F}_{i, T} \to \mathcal{Q}_i$ be an element in the equalizer of $\text{pr}_0^*$ and $\text{pr}_1^*$. By Remark \ref{remark-q-sheaf} we obtain a surjection $\mathcal{F}_T \to \mathcal{Q}$ of quasi-coherent $\mathcal{O}_{X_T}$-modules whose restriction to $X_{i, T}$ recovers $\mathcal{F}_i \to \mathcal{Q}_i$. By Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-flat-permanence} we see that $\mathcal{Q}$ is flat over $T$ as desired. In the case of the functor $\text{Q}^{fp}_{\mathcal{F}/X/B}$, i.e., if $\mathcal{Q}_i$ is of finite presentation, then $\mathcal{Q}$ is of finite presentation too by Descent on Spaces, Lemma \ref{spaces-descent-lemma-finite-presentation-descends}.
Let $T = \lim T_i$ be as in the statement of the lemma. Choose $i_0 \in I$ and replace $I$ by $\{i \in I \mid i \geq i_0\}$. We may set $B = S = T_{i_0}$ and we may replace $X$ by $X_{T_0}$ and $\mathcal{F}$ by the pullback to $X_{T_0}$. Then $X_T = \lim X_{T_i}$, see Limits of Spaces, Lemma \ref{spaces-limits-lemma-directed-inverse-system-has-limit}. Let $\mathcal{F}_T \to \mathcal{Q}$ be an element of $\text{Q}^{fp}_{\mathcal{F}/X/B}(T)$. By Limits of Spaces, Lemma \ref{spaces-limits-lemma-descend-modules-finite-presentation} there exists an $i$ and a map $\mathcal{F}_{T_i} \to \mathcal{Q}_i$ of $\mathcal{O}_{X_{T_i}}$-modules of finite presentation whose pullback to $X_T$ is the given quotient map. \medskip\noindent We still have to check that, after possibly increasing $i$, the map $\mathcal{F}_{T_i} \to \mathcal{Q}_i$ is surjective and $\mathcal{Q}_i$ is flat over $T_i$. To do this, choose an affine scheme $U$ and a surjective \'etale morphism $U \to X$ (see Properties of Spaces, Lemma \ref{spaces-properties-lemma-quasi-compact-affine-cover}). We may check surjectivity and flatness over $T_i$ after pulling back to the \'etale cover $U_{T_i} \to X_{T_i}$ (by definition). This reduces us to the case where $X = \Spec(B_0)$ is an affine scheme of finite presentation over $B = S = T_0 = \Spec(A_0)$. Writing $T_i = \Spec(A_i)$, then $T = \Spec(A)$ with $A = \colim A_i$ we have reached the following algebra problem. Let $M_i \to N_i$ be a map of finitely presented $B_0 \otimes_{A_0} A_i$-modules such that $M_i \otimes_{A_i} A \to N_i \otimes_{A_i} A$ is surjective and $N_i \otimes_{A_i} A$ is flat over $A$. Show that for some $i' \geq i$ $M_i \otimes_{A_i} A_{i'} \to N_i \otimes_{A_i} A_{i'}$ is surjective and $N_i \otimes_{A_i} A_{i'}$ is flat over $A$. The first follows from Algebra, Lemma \ref{algebra-lemma-module-map-property-in-colimit} and the second from Algebra, Lemma \ref{algebra-lemma-flat-finite-presentation-limit-flat}.
Let us construct an inverse map. Namely, suppose we have $\mathcal{F}_Y \to \mathcal{A}$, $\mathcal{F}_{Z'} \to \mathcal{B}'$, and an isomorphism $\mathcal{A}|_{X_Z} \to \mathcal{B}'|_{X_Z}$ compatible with the given surjections. Then we apply Pushouts of Spaces, Lemma \ref{spaces-pushouts-lemma-space-over-pushout-flat-modules} to get a quasi-coherent module $\mathcal{A}'$ on $X_{Y'}$ flat over $Y'$. Since this sheaf is constructed as a fibre product (see proof of cited lemma) there is a canonical map $\mathcal{F}_{Y'} \to \mathcal{A}'$. That this map is surjective can be seen because it factors as $$ \begin{matrix} \mathcal{F}_{Y'} \\ \downarrow \\ (X_Y \to X_{Y'})_*\mathcal{F}_Y \times_{(X_Z \to X_{Y'})_*\mathcal{F}_Z} (X_{Z'} \to X_{Y'})_*\mathcal{F}_{Z'} \\ \downarrow \\ \mathcal{A}' = (X_Y \to X_{Y'})_*\mathcal{A} \times_{(X_Z \to X_{Y'})_*\mathcal{A}|_{X_Z}} (X_{Z'} \to X_{Y'})_*\mathcal{B}' \end{matrix} $$ and the first arrow is surjective by More on Algebra, Lemma \ref{more-algebra-lemma-module-over-fibre-product-bis} and the second by More on Algebra, Lemma \ref{more-algebra-lemma-surjection-module-over-fibre-product}. \medskip\noindent In the case of $Q^{fp}_{\mathcal{F}/X/B}$ all we have to show is that the construction above produces a finitely presented module. This is explained in More on Algebra, Remark \ref{more-algebra-remark-relative-modules-over-fibre-product} in the commutative algebra setting. The current case of modules over algebraic spaces follows from this by \'etale localization.