There's a reason that definition does not require that the map $\phi$ in a chart $(U,\phi)$ be a diffeomorphism: that would require knowing already that $M$ is a smooth manifold, but since that is what is being defined, the definition would become circular.
However, once a smooth manifold $(M,\mathcal{A})$ is defined, then one can move forward and define smooth functions on open subsets of $M$. Namely, for each open set $W \subset M$, a function $\xi : W \to \mathbb{R}^k$ is smooth if and only if for each chart $(U,\phi)$ in the atlas $\mathcal{A}$ the map $\xi \circ \phi^{-1} : \phi(W \cap U) \to \mathbb{R}^k$ is smooth. And then, by applying the definition of a smooth atlas, it is now an easy lemma to prove that if $(U,\phi)$ is a chart in the atlas $\mathcal{A}$ then $\phi : U \to \mathbb{R}^m$ is indeed smooth.
Unfortunately Prof. Lee hasn't answered but I think I arrived at a satisfactory answer. There is a way to treat smooth manifolds and smooth manifolds with boundary simultaneously, however when the codomain is a smooth manifold the situation is slightly simpler.
General Definition. Let $M$, $N$ be smooth manifolds with boundary, $A\subseteq M$ and
$F:A\to M$ a map. We say that $F$ is smooth on $A$ if for each $p\in
A$ there is a neighborhood $W$ of $p$, a chart $(V,\psi)$ for $N$ and
a smooth map $\tilde F:W\to R^n$ such that $F(W\cap A)\subseteq V$ and
$\tilde F|W\cap A=\psi \circ F|W\cap A$.
Simplified Definition. If $N$ is a smooth manifold (without boundary) the general definition
simplifies to: We say that $F$ is smooth on $A$ if for each $p\in A$
there is a neighborhood $W$ of $p$ and a smooth map $\tilde F:W\to N$
such that $\tilde F|W\cap A=F|W\cap A$.
The following paragraphs justify the given definitions.
Let's prove that the general definition matches the simplified definition when $N$ is a smooth manifold (without boundary).
Simplified definition. $\implies$ General definition. Let $p\in A$, $\tilde W$ neighborhood of $p$ and $\tilde F:\tilde W\to N$ smooth such that $\tilde F|\tilde W\cap A=F|\tilde W\cap A$. Let $(V,\psi)$ be any chart for $N$ containing $f(p)$. Define $W=F^{-1}(V)$, then $\psi \circ \tilde F|W:W\to R^n$ is smooth because $\tilde F|W:W\to V$ and $\psi:V\to R^n$ are smooth. Also $F(W\cap A)=\tilde F(W\cap A)\subseteq V$. Finally $(\psi \circ \tilde F|W)|W\cap A=\psi \circ F|W\cap A$.
General definition. $\implies$ Simplified definition. Let $p\in A$, $W$ neighborhood of $p$, $(V,\psi)$ chart for $N$ and $\tilde F:W\to R^n$ smooth such that $F(W\cap A)\subseteq V$ and $\tilde F|W\cap A=\psi \circ F|W\cap A$. Define $\tilde W=\tilde F^{-1}(\psi(V))$, note that $\tilde W$ is a neighborhood of $p$ because $\tilde F(p)=\psi(F(p))\in \psi (V)$ and $\psi(V)$ is an open subset of $R^n$ because $N$ is a smooth manifold (without boundary). Now $\psi ^{-1}\circ \tilde F|\tilde W:\tilde W\to V\subseteq N$ is smooth because is the composition of $\psi^{-1}$ and $\tilde F|\tilde W$. Finally $(\psi^{-1}\circ \tilde F|\tilde W)|\tilde W\cap A=F|\tilde W\cap A$.
Let's prove that the general definition matches Definition 4(b).
Definition 4(b) $\implies$ General definition. Let $p\in A$, $\tilde W$ neighborhood of $p$ and $(V,\psi)$ chart for $N$ such that $F(\tilde W\cap A)\subseteq V$ and $\psi\circ F|\tilde W\cap A:\tilde W\cap A\to R^n$ is smooth as in Definition 3. Particularly there is a neighborhood $W$ of $p$ and a smooth map $\tilde F:W\to R^n$ with $W\subseteq \tilde W$ and $\tilde F|W\cap A=\psi \circ F|W\cap A$ ,i.e. pick $q=p$ in the notation of Definition 4(b). Finally $F(W\cap A)=\psi^{-1}(\tilde F(W\cap A))\subseteq \psi^{-1}(\psi(V))=V$.
General definition. $\implies$ Definition 4(b) Let $p\in A$, $W$ neighborhood of $p$, $(V,\psi)$ chart for $N$ and $\tilde F:W\to R^n$ smooth such that $F(W\cap A)\subseteq V$ and $\tilde F|W\cap A=\psi \circ F|W\cap A$. Let $q\in W\cap A$ (as in Definition 4(b)) and define $U=W$.
Best Answer
This is true in general: If $f\colon X \to Y$ and $g\colon Y \to X$ are two functions satisfying
$$ g\circ f = \operatorname{id}_X, $$ then $f$ is injective. If $x,y \in X$ are such that $f(x) = f(y)$, then of course it is also true that $g(f(x)) = g(f(y))$ and by the above identity, $x = y$ which shows injectivity. In your case, $f = \operatorname{d}\gamma_x$ and $g = \operatorname{d}(\pi_M)_{(x,f(x))}$.