Lemma 101.25.5. Let $\mathcal{X} \to \mathcal{Y} \to \mathcal{Z}$ be morphisms of algebraic stacks. If $\mathcal{X} \to \mathcal{Z}$ is flat and $\mathcal{X} \to \mathcal{Y}$ is surjective and flat, then $\mathcal{Y} \to \mathcal{Z}$ is flat.

Proof. Choose an algebraic space $W$ and a surjective smooth morphism $W \to \mathcal{Z}$. Choose an algebraic space $V$ and a surjective smooth morphism $V \to W \times _\mathcal {Z} \mathcal{Y}$. Choose an algebraic space $U$ and a surjective smooth morphism $U \to V \times _\mathcal {Y} \mathcal{X}$. We know that $U \to V$ is flat and that $U \to W$ is flat. Also, as $\mathcal{X} \to \mathcal{Y}$ is surjective we see that $U \to V$ is surjective (as a composition of surjective morphisms). Hence the lemma reduces to the case of morphisms of algebraic spaces. The case of morphisms of algebraic spaces is Morphisms of Spaces, Lemma 67.31.5. $\square$

In your comment you can use Markdown and LaTeX style mathematics (enclose it like $\pi$). A preview option is available if you wish to see how it works out (just click on the eye in the toolbar).