This question was asked in my exercise of differential geometry and I am not able to fully solve this question.
Let $ M \subset \mathbb{R}^n$ be a sub manifold of dimension $k$, let $\psi: O \subset \mathbb{R}^k \to M$ be a coordinate charts and let $f: V \to \psi(O) \subset M$ be a smooth map with $ V \subset \mathbb{R}^p$ open , smooth in the ordinary sense of a map from $ V$ to $\mathbb{R}^n$. Prove that there exists a unique smooth map $ g : V \to O$ such that $\psi \circ g=f$.
Attempt: I have managed to prove uniqueness but I am not sure how can I prove the existence of the map $g$ ? Which results should I use for it? Can you please outline a proof ?
I think that one attempt could be the following.
The fact that the map $f:V\to \psi(O)$ is smooth means exactly that $f$ is smooth in any local chart. In particular, we have that the function $\psi^{-1}\circ f:V\to O$ is smooth as a map from $V\subset \mathbb{R}^p$ to $O\subset \mathbb{R}^k$.
Now define the map $g$ as $$g:=\psi^{-1}\circ f:V\to O.$$
This map is clearly smooth, by what I have just said (smoothness of $f$ in any local chart).
Moreover, for any $x\in V$ we have $$\psi \circ g(x)=\psi \circ \psi^{-1} \circ f(x)= f(x)$$ and so $\psi\circ g=f$.
Lastly, $g$ is unique. Indeed, if there are two such maps $g_1$ and $g_2$, then $$\psi\circ g_1=f=\psi\circ g_2$$ implying $$g_1=\psi^{-1}\circ \psi \circ g_1=\psi^{-1}\circ \psi \circ g_2=g_2$$ i.e. $g_1=g_2$.