Existence of neighbourhoods and diffeomorphism to form a projection

Let $f \in C^1(\mathbb{R^n})$ be a given function with $f(0)=0$ and $∂_1f(0) \neq 0$.

Show that there exist neighbourhoods $U$ and $V$ of $x=0 \in \mathbb{R^n}$ and a diffeomorphism $\phi: U \rightarrow V$, such that $f(\phi(x))=x_1$ for all $x=(x_1,...,x_n) \in U$.

I do not know how to tackle this problem. Any hints are welcome.

I'll write points in $\mathbb R^n$ as $(x_1,x'),$ with $x_1\in \mathbb R, x'=(x_2,\dots , x_n)\in \mathbb R^{n-1}.$

Define the map

$$\psi(x_1,x') = (f(x_1,x'),x').$$

Then $\psi(0) = 0.$ Consider the matrix of $D\psi(0).$ The first column is $\partial f/\partial x_1 (0)$ at the top, followed by all $0$'s. The second column is $\partial f/\partial x_2 (0)$ at the top, followed by a $1,$ then all $0$'s. The third column is $\partial f/\partial x_3 (0)$ at the top, followed by a $0,$ then a $1,$ then all $0$'s. Etc. Because $\partial f/\partial x_1 (0)\ne 0,$ these columns are linearly independent. Hence $D\psi(0)$ is nonsingular.

Now we can apply the inverse function to see that there are neighborhoods $U,V$ of $0$ such that $\psi: U\to V$ is a diffeomorhism. It's the diffeomophism $\psi^{-1}:V\to U$ that we want. To verify this, let $(x_1,x')\in V.$ Then

$$(x_1,x')= \psi(\psi^{-1}(x_1,x')) = (f(\psi^{-1}(x_1,x')),x').$$

Thus $f(\psi^{-1}(x_1,x'))=x_1$ for all $(x_1,x')\in V,$ as desired.