Preface
This post may be quite long, however I wanted my question to be as complete as possible so please bear with me.
Suppose $M \subseteq \mathbb{R}^k$ and $N \subseteq \mathbb{R}^l$ are two smooth manifolds of dimensions $m$ and $n$ respectively, and let $f : M \to N$ be a smooth mapping between these two manifolds, and let $x \in M$.
Definition $(1)$ - As a map between tangent spaces
The derivative of $f$ at $x$ is the a linear transformation of the tangent spaces $$df_x : TM_x \to TN_{f(x)}$$
Now we know the following is true:
Suppose $\phi : U \subseteq \mathbb{R}^m \to M$ is a parameterization of a neighbourhood $\phi[U]$ of $x$, with $\phi(u) =x$ for some $u \in U$, and similarly suppose $\psi : V \subseteq \mathbb{R}^n \to N$ is a parameterization of a neighbourhood $\psi[V]$ of $f(x)$, with $\psi(v) =f(x)$ for some $v \in V$.
Then taking derivatives we obtain $d\phi_u : \mathbb{R}^m \to \mathbb{R}^k$ and $d\psi_v : \mathbb{R}^n \to \mathbb{R}^l$, and we have $$TM_x = d\phi_u[\mathbb{R}^m] \ \ \text{ and } \ \ d\psi_v[\mathbb{R}^n] = TN_{f(x)}$$ and it follows that $TM_x \cong \mathbb{R}^m$ and $TN_{f(x)} \cong \mathbb{R}^n$.
Definition $(2)$ - Assigning directional derivatives
However the other definition of the derivative can be defined as follows. Now we don't know if $M$ is open or not in $\mathbb{R}^k$. So we have two cases to look at
Case 1: $M$ is open in $\mathbb{R}^k$
The derivative of $f$ in the direction $h \in \mathbb{R}^k$, taken at the point $x \in M$ is defined by the conventional limit $$df_x(h) = \lim_{t \to 0} \frac{f(x + th) - f(x)}{t}$$
Now with $x$ fixed, we define $$df_x : \mathbb{R^k} \to \mathbb{R^l}$$ by assigning to each vector $h \in \mathbb{R}^k$ the directional derivative $df_x(h) \in \mathbb{R}^l$, this map is called the derivative of $f$ at $x$.
Case 2: $M$ is not open in $\mathbb{R}^k$
We do know that $f$ is smooth, hence for each $x \in M$, there is an open set $W \subseteq \mathbb{R}^k$ and a smooth map $F : W \to \mathbb{R}^l$, such that $F = f$ on $W \cap M$
In this case I'm not even sure how one defines the derivative of $f$ at $x$
Now in Case 1 above, clearly $\mathbb{R}^m \not\cong \mathbb{R}^k$ and $\mathbb{R}^n \not\cong \mathbb{R}^l$, unless $m = k$ and $n = l$, so how can the two definitons of the derivative of $f$ at $x$ agree for this case.
Furthermore I'm not even sure how Case 2 one can define the derivative of $f$ at $x$.
So how can one prove that the two definitions of the derivative are equivalent?
This is not a full answer but here we go anyway:
The main problem when defining the differential of a map $f \colon M \to N$ is, that if $M$ and $N$ are not embedded in some Euclidean space, we actually don't know how to differentiate a map as we are used to in calculus. But differentiation is a local property and thus there is quite a natural way how to define $df_x \colon TM_x \to TN_{f(x)}$:
Take a chart $\varphi \colon U \to \varphi(U) \subset \mathbb{R}^n$ around $x \in U \subset M$ and analogously a chart $\psi \colon V \to \psi(V) \subset \mathbb{R}^n$ around $f(x) \in V \subset N$. By definition (1) of the tangent space, the differentials $$d\varphi_x \colon TM_x \to \mathbb{R}^n, \; d\psi_{f(x)} \colon TN_{f(x)} \to \mathbb{R}^m$$ are vector space isomorphisms. Observe that the map $$\psi \circ f \circ \varphi^{-1} \colon \mathbb{R}^n \to \mathbb{R}^m$$ is real valued, in particular we can define the differential $$d(\psi \circ f \circ \varphi^{-1})_{\varphi(x)}$$ as in definition (2). Now let us cheat a little bit and assume that in this setting the chain rule still holds, then we will get the following: $$d(\psi \circ f \circ \varphi^{-1})_{\varphi(x)}=d\psi_{f(x)} \circ df_x \circ d(\varphi^{-1})_{\varphi(x)}=d\psi_{f(x)} \circ df_x \circ (d\varphi_{x})^{-1}.$$ Thus $df_x$ is uniquely determined by the differential of $f$ in local coordinates. There are obviously quite a few things I didn't fully explained, but first let me see if this was any helpful.