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.
The proof is a follow-your-nose manipulation of the definitions of charts for $M$, $N$ and $\partial N$.
Let $m = \text{dimension}(M)$ and $n = \text{dimension}(N)$.
Let $x \in M$ and $y=f(x) \in \partial N$. We want to prove that $f : M \to N$ is smooth at $x$ if and only if $f : M \to \partial N$ is smooth at $x$. Since smoothness is independent of charts, it suffices to construct particular charts $(U,\phi)$ of $M$ at $x$, $(V,\psi)$ of $N$ at $y$, and $(W,\theta)$ of $\partial N$ at $y$, such that $f(W) \subset U \cap V$, and such that the map $\psi \circ f \circ \phi^{-1}$ is smooth if and only if the map $\theta \circ f \circ \phi^{-1}$ is smooth.
Start with an arbitrary chart of $N$ near $y$, given by $\psi : V \to \mathbb H^n$ where $\mathbb H^n = \{(t_1,...,t_{n-1},t_n) \in \mathbb R^n \mid t_n \ge 0\}$. Let $W = \partial N \cap g^{-1}(V)$. Let $\pi : \mathbb H^n \to \mathbb R^{n-1}$ be the projection given by $\pi(t_1,...,t_{n-1},t_n) = (t_1,...,t_{n-1})$. Let $\theta : W \to \mathbb R^{n-1}$ be given by $\theta = \pi_n \circ g$. As a consequence of the definition of the boundary it follows that $\theta$ is a chart of $\partial N$ near $y$.
Now consider a chart of $M$ near $x$, given by $\phi : U \to \mathbb R^m$. We may assume that $U \subset \theta^{-1}(W)$, by replacing $U$ with $U \cap \theta^{-1}(W)$. It also follows that $U \subset \psi^{-1}(V)$.
We may write the local expression for $f$ using the $U$ and $V$ coordinates as
$$\psi \circ f \circ \phi^{-1}(x_1,...,x_m) = (f_1(x_1),...,f_{n-1}(x_1,...,x_m),f_n(x_1,...,x_m))
$$
but notice that since $f(M) \subset \partial N$ we must have $f_n(x_1,...,x_m)=0$. Therefore, we may simplify the above formula to
$$\psi \circ f \circ \phi^{-1}(x_1,...,x_m) = (f_1(x_1),...,f_{n-1}(x_1,...,x_m),0)
$$
By composing with the projection map $\pi$, it follows that the local expression for $f$ using the $U$ and $W$ charts is given by
$$\theta \circ f \circ \phi^{-1}(x_1,...,x_m) = (f_1(x_1,...,x_m),...,f_{n-1}(x_1,...,x_m))
$$
It follows that $\psi \circ f \circ \phi^{-1}$ is smooth if and only if the functions $f_1,...,f_{n-1}$ are smooth if and only $\theta \circ f \circ \phi^{-1}$ is smooth.
Best Answer
The definition of Differentiable function on smooth manifold, does not depend on the choice of local chart. Since if $f:M\to \mathbb{R}$ be Differentiable at $p\in M$ and $(U,\varphi)$ be the corresponding local chart. For each local chart $(V,\psi)$ which $p\in V$, we have $p\in W=U\cap V$ and $f\circ \psi^{-1}|_{\psi(W)}=f\circ\varphi^{-1}\circ\varphi \circ \psi^{-1}|_{\psi(W)}$.
Because of $M$ is smooth, $\varphi \circ\psi^{-1}|_{\psi(W)}$ is $C^{\infty}$ and $f \circ \psi^{-1}$ is $C^{\infty}$ to. So, the composition is $C^{\infty}$.
Let $W=U\cap V$. Then, the map $\varphi \circ \psi^{-1}:\psi(W)\to \varphi (W)$ is $C^{\infty}$. Now, $(f.g)\circ \psi^{-1}|_{\psi(W)}=(f \circ \psi^{-1}|_{\psi(W)}).(g\circ \psi^{-1}|_{\psi(W)})=(f\circ\varphi^{-1}\circ\varphi \circ \psi^{-1}|_{\psi(W)}).(g\circ \psi^{-1}|_{\psi(W)})$ is $C^{\infty}$.