Choose an affine scheme $U$ and a surjective, flat, finite, and locally finitely presented morphism $U \to \mathcal{X}$. Since $h$ is representable by algebraic spaces (Morphisms of Stacks, Lemmas \ref{stacks-morphisms-lemma-aut-iso-unramified} and \ref{stacks-morphisms-lemma-stabilizer-preserving}) we see that $U' = \mathcal{X}' \times_\mathcal{X} U$ is an algebraic space. Since $U' \to U$ is separated and \'etale, we see that $U'$ is a scheme and that every finite set of points of $U'$ is contained in an affine open, see Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-locally-quasi-finite-separated-representable} and More on Morphisms, Lemma \ref{more-morphisms-lemma-separated-locally-quasi-finite-over-affine}. Setting $R' = U' \times_{\mathcal{X}'} U'$ we see that $s', t' : R' \to U'$ are finite locally free. By Groupoids, Lemma \ref{groupoids-lemma-find-invariant-affine} there exists an open covering $U' = \bigcup U'_i$ by $R'$-invariant affine open subschemes $U'_i \subset U'$. Let $\mathcal{X}'_i \subset \mathcal{X}'$ be the corresponding open substacks. These are well-nigh affine as $U'_i \to \mathcal{X}'_i$ is surjective, flat, finite and of finite presentation. By Lemma \ref{lemma-well-nigh-affine-moduli-space-etale} we obtain cartesian diagrams $$ \xymatrix{ \mathcal{X}'_i \ar[r] \ar[d] & \mathcal{X} \ar[d] \\ M'_i \ar[r] & M } $$ with $M'_i \to M$ an \'etale morphism of affine schemes and vertical arrows as in Lemma \ref{lemma-well-nigh-affine-moduli-space}. Observe that $\mathcal{X}'_{ij} = \mathcal{X}'_i \cap \mathcal{X}'_j$ is an open subspace of $\mathcal{X}'_i$ and $\mathcal{X}'_j$. Hence we get corresponding open subschemes $V_{ij} \subset M'_i$ and $V_{ji} \subset M'_j$. By the result of Lemma \ref{lemma-moduli-space-finite-affine} we see that both $\mathcal{X}'_{ij} \to V_{ij}$ and $\mathcal{X}'_{ji} \to V_{ji}$ are categorical moduli spaces! Thus we get a unique isomorphism $\varphi_{ij} : V_{ij} \to V_{ji}$ such that $$ \xymatrix{ \mathcal{X}'_i \ar[d] & & \mathcal{X}'_i \cap \mathcal{X}'_j \ar[rr] \ar[ll] \ar[ld] \ar[rd] & & \mathcal{X}'_j \ar[d] \\ M'_i & V_{ij} \ar[l] \ar[rr]^{\varphi_{ij}} & & V_{ji} \ar[r] & M'_j } $$ is commutative. These isomorphisms satisfy the cocyclce condition of Schemes, Section \ref{schemes-section-glueing-schemes} by a computation (and another application of the previous lemma) which we omit. Thus we can glue the affine schemes in to scheme $M'$, see Schemes, Lemma \ref{schemes-lemma-glue}. Let us identify the $M'_i$ with their image in $M'$. We claim there is a morphism $\mathcal{X}' \to M'$ fitting into cartesian diagrams $$ \xymatrix{ \mathcal{X}'_i \ar[r] \ar[d] & \mathcal{X}' \ar[d] \\ M'_i \ar[r] & M' } $$ This is clear from the description of the morphisms into the glued scheme $M'$ in Schemes, Lemma \ref{schemes-lemma-glue} and the fact that to give a morphism $\mathcal{X}' \to M'$ is the same thing as given a morphism $T \to M'$ for any morphism $T \to \mathcal{X}'$. Similarly, there is a morphism $M' \to M$ restricting to the given morphisms $M'_i \to M$ on $M'_i$. The morphism $M' \to M$ is \'etale (being \'etale on the members of an \'etale covering) and the fibre product property holds as it can be checked on members of the (affine) open covering $M' = \bigcup M'_i$. Finally, $M' \to M$ is separated because the composition $U' \to \mathcal{X}' \to M'$ is surjective and universally closed and we can apply Morphisms, Lemma \ref{morphisms-lemma-image-universally-closed-separated}.