Let $f:U\rightarrow \Bbb{R}^{m}$ be a function of class $C^{k\geq 1}$, where $U$ is an open subset of $\Bbb{R}^n$. If $f'(a)$ has rank $p$ for some $a\in U$, there exists an embedding (immersion that is homeomorphism into its image) $\phi:V\rightarrow U$ of class $C^\infty,$ where $V\subset\Bbb{R}^{p}$ such that $f\circ \phi:V\rightarrow\Bbb{R}^{m}$ is an embedding.
I have seen this question, and I did understand the intuition, but I'm having problems to write it down.
By a Lemma, since $\dim(\textrm{Im}(f'(a)))$, there exists a decomposition $\Bbb{R}^m=\Bbb{R}^p\bigoplus\Bbb{R}^{m-p}$ such that the projection $$\pi:\Bbb{R}^{m}\rightarrow\Bbb{R}^{p},(x,y)\mapsto x$$ applies $\textrm{Im}(f'(a))$ isomorphically.
Question: How do I construct the map $\phi$?
Maybe I can use this projection to define my $\phi$, but I don't know exactly how to do it.
It is not needed anything much more substantial than what Llohann said in the post you link.
Take a complement $E$ of $\ker f'(a)$. If $\iota: E \to \mathbb{R}^n $ is the inclusion, then $f \circ \iota$ is an immersion near $a$. (We've just killed the kernel of $f'(a)$.) Locally, it is then an embedding. Now you just pick any isomorphism $\Psi: \mathbb{R}^p \to E$ and let $\phi = \iota \circ \Psi$, of course restricted to the necessary neighbourhood.