Let $\mathcal{Y}' \to \mathcal{Y}$ be a flat morphism of algebraic stacks. Choose a scheme $V$ and a surjective smooth morphism $V \to \mathcal{Y}$. Choose a scheme $V'$ and a surjective smooth morphism $V' \to \mathcal{Y}' \times_\mathcal{Y} V$. We may and do assume that $V = \coprod_{i \in I} V_i$ is a disjoint union of affine schemes and that $V' = \coprod_{i \in I} \coprod_{j \in J_i} V_{i, j}$ is a disjoint union of affine schemes with each $V_{i, j}$ mapping into $V_i$. Let \begin{enumerate} \item $\mathcal{Z} \subset \mathcal{Y}$ be the scheme theoretic image of $f$, \item $\mathcal{Z}' \subset \mathcal{Y}'$ be the scheme theoretic image of the base change of $f$ by $\mathcal{Y}' \to \mathcal{Y}$, \item $Z \subset V$ be the scheme theoretic image of the base change of $f$ by $V \to \mathcal{Y}$, \item $Z' \subset V'$ be the scheme theoretic image of the base change of $f$ by $V' \to \mathcal{Y}$. \end{enumerate} If we can show that (a) $Z = V \times_\mathcal{Y} \mathcal{Z}$, (b) $Z' = V' \times_{\mathcal{Y}'} \mathcal{Z}'$, and (c) $Z' = V' \times_V Z$ then the lemma follows: the inclusion $\mathcal{Z}' \to \mathcal{Z} \times_\mathcal{Y} \mathcal{Y}'$ (Lemma \ref{lemma-factor-factor}) has to be an isomorphism because after base change by the surjective smooth morphism $V' \to \mathcal{Y}'$ it is. \medskip\noindent Proof of (a). Set $R = V \times_\mathcal{Y} V$. By Properties of Stacks, Lemma \ref{stacks-properties-lemma-substacks-presentation} the rule $\mathcal{Z} \mapsto \mathcal{Z} \times_\mathcal{Y} V$ defines a $1$-to-$1$ correspondence between closed substacks of $\mathcal{Y}$ and $R$-invariant closed subspaces of $V$. Moreover, $f : \mathcal{X} \to \mathcal{Y}$ factors through $\mathcal{Z}$ if and only if the base change $g : \mathcal{X} \times_\mathcal{Y} V \to V$ factors through $\mathcal{Z} \times_\mathcal{Y} V$. We claim: the scheme theoretic image $Z \subset V$ of $g$ is $R$-invariant. The claim implies (a) by what we just said. \medskip\noindent For each $i$ the morphism $\mathcal{X} \times_\mathcal{Y} V_i \to V_i$ is quasi-compact and hence $\mathcal{X} \times_\mathcal{Y} V_i$ is quasi-compact. Thus we can choose an affine scheme $W_i$ and a surjective smooth morphism $W_i \to \mathcal{X} \times_\mathcal{Y} V_i$. Observe that $W = \coprod W_i$ is a scheme endowed with a smooth and surjective morphism $W \to \mathcal{X} \times_\mathcal{Y} V$ such that the composition $W \to V$ with $g$ is quasi-compact. Let $Z \to V$ be the scheme theoretic image of $W \to V$, see Morphisms, Section \ref{morphisms-section-scheme-theoretic-image} and Morphisms of Spaces, Section \ref{spaces-morphisms-section-scheme-theoretic-image}. It follows from Lemma \ref{lemma-cover-upstairs} that $Z \subset V$ is the scheme theoretic image of $g$. To show that $Z$ is $R$-invariant we claim that both $$ \text{pr}_0^{-1}(Z), \text{pr}_1^{-1}(Z) \subset R = V \times_\mathcal{Y} V $$ are the scheme theoretic image of $\mathcal{X} \times_\mathcal{Y} R \to R$. Namely, we first use Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-flat-base-change-scheme-theoretic-image} to see that $\text{pr}_0^{-1}(Z)$ is the scheme theoretic image of the composition $$ W \times_{V, \text{pr}_0} R = W \times_\mathcal{Y} V \to \mathcal{X} \times_\mathcal{Y} R \to R $$ Since the first arrow here is surjective and smooth we see that $\text{pr}_0^{-1}(Z)$ is the scheme theoretic image of $\mathcal{X} \times_\mathcal{Y} R \to R$. The same argument applies that $\text{pr}_1^{-1}(Z)$. Hence $Z$ is $R$-invariant. \medskip\noindent Statement (b) is proved in exactly the same way as one proves (a). \medskip\noindent Proof of (c). Let $Z_i \subset V_i$ be the scheme theoretic image of $\mathcal{X} \times_\mathcal{Y} V_i \to V_i$ and let $Z_{i, j} \subset V_{i, j}$ be the scheme theoretic image of $\mathcal{X} \times_\mathcal{Y} V_{i, j} \to V_{i, j}$. Clearly it suffices to show that the inverse image of $Z_i$ in $V_{i, j}$ is $Z_{i, j}$. Above we've seen that $Z_i$ is the scheme theoretic image of $W_i \to V_i$ and by the same token $Z_{i, j}$ is the scheme theoretic image of $W_i \times_{V_i} V_{i, j} \to V_{i, j}$. Hence the equality follows from the case of schemes (Morphisms, Lemma \ref{morphisms-lemma-flat-base-change-scheme-theoretic-image}) and the fact that $V_{i, j} \to V_i$ is flat.