Let $f:M \to N$ be smooth such that $\text{Im}(f) \subset \partial N$. Prove that $f$ as mapping $f:M \to \partial N$ is smooth.
I've tried to write down $f:M \to \partial N$ as composition of two smooth maps $f:M \to N$ and $g:N \to \partial N$, but without any result.
Well there isn't a nice map $N\to \partial N$, but there is the smooth inclusion $i :\partial N \to N$.
Hint: Your hypothesis implies that $f$ factors
$f = f'\circ i: M\to \partial N\to N$,
where the second arrow is the inclusion, and $f': M\to \partial N$ is the map you want to see is smooth. From this, can you conclude that $f'$ is smooth?
Hint: to prove smoothness, it suffices to do so locally. By the local immersion theorem, we can pick charts near points $x\in M, \: f(x)\in \partial N\subset N$ so that $i$ corresponds to the injection $(x_1,\ldots,x_n) \mapsto (x_1,\ldots,x_n,0)$.
Now the statement is to show that a smooth map $\mathbb R^m\to \mathbb R^{n+1}$ which factors through the first n variables gives a smooth map $\mathbb R^m\to \mathbb R^n$.