I'm stuck with the following proof. Suppose $X$ and $Y$ are smooth manifolds, and $f : X \rightarrow Y$ is smooth. Let $Z$ be a smooth submanifold of $Y$. Suppose that $c:=\text{codim}_YZ$ and that $g:Y \rightarrow {\rm I\!R}^c$ is smooth and that $Z=g^{−1}(0)$ and, for all $y \in Y$, $d_yg: T_Y \rightarrow T_{g(y)}{\rm I\!R}^c$ is onto (i.e., is a surjection). Finally, suppose that, for all $x \in f^{−1}(Z)$, $\text{im}d_xf + T_{f(x)}Z = T_{f(x)}Y$.
Then, prove that $0$ is a regular value of $g \circ f$, i.e., prove that, for all $x \in (g \circ f)^{−1}(0)$, $d_x(g \circ f)$ is onto.