[step:Conclude that $Y$ is an $(n-k)$-dimensional embedded submanifold with smooth inclusion]
We have exhibited, for every $p \in Y$, a submanifold chart $(W, F)$ such that $F(Y \cap W) = F(W) \cap (\{0\}^k \times \mathbb{R}^{n-k})$. Composing $F|_{Y \cap W}$ with the projection
\begin{align*}
\pi: \{0\}^k \times \mathbb{R}^{n-k} &\to \mathbb{R}^{n-k} \\
(0, \dots, 0, y_{k+1}, \dots, y_n) &\mapsto (y_{k+1}, \dots, y_n)
\end{align*}
yields a chart $(W \cap Y, \pi \circ F|_{Y \cap W})$ on $Y$ taking values in an open subset of $\mathbb{R}^{n-k}$. Two such charts $(W_\alpha \cap Y, \pi \circ F_\alpha)$ and $(W_\beta \cap Y, \pi \circ F_\beta)$ have smooth transition: their composition factors through $F_\beta \circ F_\alpha^{-1}$, which is smooth because $F_\alpha$ and $F_\beta$ are smooth charts on $M$. Therefore these charts form a smooth atlas making $Y$ an $(n-k)$-dimensional smooth manifold.
Finally, in the chart $(W, F)$ on $M$ and the chart $(W \cap Y, \pi \circ F|_{Y \cap W})$ on $Y$, the inclusion $\iota: Y \hookrightarrow M$ is represented by
\begin{align*}
(y_{k+1}, \dots, y_n) \mapsto (0, \dots, 0, y_{k+1}, \dots, y_n),
\end{align*}
which is a smooth linear map. Thus $\iota$ is smooth, completing the proof that $Y = f^{-1}(q)$ is an $(n-k)$-dimensional embedded submanifold of $M$.
[/step]