Choose a scheme $U'$ and a surjective smooth morphism $U' \to \mathcal{X}'$. As usual we set $U = \mathcal{X} \times_{\mathcal{X}'} U'$. Then $U \to \mathcal{X}$ is a surjective smooth morphism. Therefore the base change $$ V = W \times_{\mathcal{X}} U \longrightarrow W $$ is a surjective smooth morphism of algebraic spaces. By Topologies on Spaces, Lemma \ref{spaces-topologies-lemma-etale-dominates-smooth} we can find an \'etale covering $\{W_i \to W\}$ such that $W_i \to W$ factors through $V \to W$. After covering $W_i$ by affines (Properties of Spaces, Lemma \ref{spaces-properties-lemma-cover-by-union-affines}) we may assume each $W_i$ is affine. We may and do replace $W$ by $W_i$ which reduces us to the situation discussed in the next paragraph. \medskip\noindent Assume $W$ is affine and the given morphism $W \to \mathcal{X}$ factors through $U$. Picture $$ W \xrightarrow{i} U \to \mathcal{X} $$ Since $W$ and $U$ are smooth over $\mathcal{X}$ we see that $i$ is locally of finite type (Morphisms of Stacks, Lemma \ref{stacks-morphisms-lemma-finite-type-permanence}). After replacing $U$ by $\mathbf{A}^n_U$ we may assume that $i$ is an immersion, see Morphisms, Lemma \ref{morphisms-lemma-quasi-affine-finite-type-over-S}. By Morphisms of Stacks, Lemma \ref{stacks-morphisms-lemma-lci-permanence} the morphism $i$ is a local complete intersection. Hence $i$ is a Koszul-regular immersion (as defined in Divisors, Definition \ref{divisors-definition-regular-immersion}) by More on Morphisms, Lemma \ref{more-morphisms-lemma-lci}. \medskip\noindent We may still replace $W$ by an affine open covering. For every point $w \in W$ we can choose an affine open $U'_w \subset U'$ such that if $U_w \subset U$ is the corresponding affine open, then $w \in i^{-1}(U_w)$ and $i^{-1}(U_w) \to U_w$ is a closed immersion cut out by a Koszul-regular sequence $f_1, \ldots, f_r \in \Gamma(U_w, \mathcal{O}_{U_w})$. This follows from the definition of Koszul-regular immersions and Divisors, Lemma \ref{divisors-lemma-regular-ideal-sheaf-scheme}. Set $W_w = i^{-1}(U_w)$; this is an affine open neighbourhood of $w \in W$. Choose lifts $f'_1, \ldots, f'_r \in \Gamma(U'_w, \mathcal{O}_{U'_w})$ of $f_1, \ldots, f_r$. This is possible as $U_w \to U'_w$ is a closed immersion of affine schemes. Let $W'_w \subset U'_w$ be the closed subscheme cut out by $f'_1, \ldots, f'_r$. We claim that $W'_w \to \mathcal{X}'$ is smooth. The claim finishes the proof as $W_w = \mathcal{X} \times_{\mathcal{X}'} W'_w$ by construction. \medskip\noindent To check the claim it suffices to check that the base change $W'_w \times_{\mathcal{X}'} X' \to X'$ is smooth for every affine scheme $X'$ smooth over $\mathcal{X}'$. Choose an \'etale morphism $$ Y' \to U'_w \times_{\mathcal{X}'} X' $$ with $Y'$ affine. Because $U'_w \times_{\mathcal{X}'} X'$ is covered by the images of such morphisms, it is enough to show that the closed subscheme $Z'$ of $Y'$ cut out by $f'_1, \ldots, f'_r$ is smooth over $X'$. Picture $$ \xymatrix{ Z' \ar[r] \ar[d] & Y' \ar[d] \\ W'_w \times_{\mathcal{X}'} X' \ar[d] \ar[r] & U'_w \times_{\mathcal{X}'} X' \ar[d] \ar[r] & X' \\ W'_w = V(f'_1, \ldots, f'_r) \ar[r] & U'_w } $$ Set $X = \mathcal{X} \times_{\mathcal{X}'} X'$, $Y = X \times_{X'} Y' = \mathcal{X} \times_{\mathcal{X}'} Y'$, and $Z = Y \times_{Y'} Z' = X \times_{X'} Z' = \mathcal{X} \times_{\mathcal{X}'} Z'$. Then $(Z \subset Z') \to (Y \subset Y') \subset (X \subset X')$ are (cartesian) morphisms of thickenings of affine schemes and we are given that $Z \to X$ and $Y' \to X'$ are smooth. Finally, the sequence of functions $f'_1, \ldots, f'_r$ map to a Koszul-regular sequence in $\Gamma(Y', \mathcal{O}_{Y'})$ by More on Algebra, Lemma \ref{more-algebra-lemma-koszul-regular-flat-base-change} because $Y' \to U'_w$ is smooth and hence flat. By More on Algebra, Lemma \ref{more-algebra-lemma-cut-by-koszul} (and the fact that Koszul-regular sequences are quasi-regular sequences by More on Algebra, Lemmas \ref{more-algebra-lemma-regular-koszul-regular}, \ref{more-algebra-lemma-koszul-regular-H1-regular}, and \ref{more-algebra-lemma-H1-regular-quasi-regular}) we conclude that $Z' \to X'$ is smooth as desired.