Let $U\subset\mathbb{R}^n$ and $V\subset\mathbb{R}^m$ be open sets, both containing the origin. Also let $W=\{\mathbf{x}\in U\mid x_n=0\}$. Suppose that $f:U\rightarrow V$ is a smooth submersion, and that $f_{\mid W}$ is also a smooth submersion. Finally, let $S=f^{-1}(\mathbf{0})$.
If $\pi:S\rightarrow\mathbb{R}$ is the projection $\pi(\mathbf{x})=x_n$, I want to show $0$ is a regular value of $\pi$.
The hint I'm given is to consider the tangent spaces of $S$ and $W$.
So I suppose the contrary, that for some $q\in S\cap W$, $d\pi_q$ is the zero map. This means $TS_q\subset\{\frac{\partial}{\partial x_1},\ldots,\frac{\partial}{\partial x_{n-1}}\}$. I also know that $TW_q\subset\{\frac{\partial}{\partial x_1},\ldots,\frac{\partial}{\partial x_{n-1}}\}$. What I don't see is how to combine this to show $f_{\mid W}$ is not a submersion at $q$ (which I'm guessing is the right approach).
What am I missing? For context, this problem is from an intro to smooth manifolds problem set, so I don't know any fancy techniques. In other words, I want to keep this as low-tech as possible.
I think this works, based on what Lee Mosher said above.
We have a surjective map $df_q: TU_q\rightarrow TV_{f(q)}$, and the kernel is $TS_q$, which is then dimension $n-m$. We also have a map $d\pi_q:TU_q\rightarrow T\mathbb{R}_{\pi(q)}$, and the kernel is $TW_q$, of dimension $n-1$.
Because $f$ is a submersion when restricted to $W$, we also have $df_q: TW_q\rightarrow TV_{f(q)}$ is surjective, and the kernel is $TS_q\cap TW_q$, of dimension $n-1-m$. This means $TS_q\not\subset TW_q=\ker(d\pi_q)$, so $d\pi_q:TS_q\rightarrow T\mathbb{R}_{\pi(q)}$ is surjective.
This means $0$ is actually a regular value of $\pi_{\mid S}$.