$\xymatrix{ \mathcal{X}_1 \ar[d] \ar[r]_{f_1} & \mathcal{Y}_1 \ar[d] \\ \mathcal{X}_2 \ar[r]^{f_2} & \mathcal{Y}_2 }$

be a commutative diagram of algebraic stacks. Let $\mathcal{Z}_ i \subset \mathcal{Y}_ i$, $i = 1, 2$ be the scheme theoretic image of $f_ i$. Then the morphism $\mathcal{Y}_1 \to \mathcal{Y}_2$ induces a morphism $\mathcal{Z}_1 \to \mathcal{Z}_2$ and a commutative diagram

$\xymatrix{ \mathcal{X}_1 \ar[r] \ar[d] & \mathcal{Z}_1 \ar[d] \ar[r] & \mathcal{Y}_1 \ar[d] \\ \mathcal{X}_2 \ar[r] & \mathcal{Z}_2 \ar[r] & \mathcal{Y}_2 }$

Proof. The scheme theoretic inverse image of $\mathcal{Z}_2$ in $\mathcal{Y}_1$ is a closed substack of $\mathcal{Y}_1$ through which $f_1$ factors. Hence $\mathcal{Z}_1$ is contained in this. This proves the lemma. $\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).