I am not sure this question is appropriate for this site but here is a proof.
By translation, we can suppose p=0. By rotation, we can suppose $\mathbb{R}^d=\mathbb{R}^{n+m}$ and $\mathbb{R}^n\times\{0\}=T_0M$. So the inverse mapping theorem (use projection map from $M$ onto $\mathbb{R}^n$) implies that in a neighbourhood of $0$, there exists a smooth function defined in a neighourhood of $0$ $f:\mathbb{R}^n\to \mathbb{R}^m$ such that $$M=\{(x,f(x)):x\in \mathbb{R}^n\}.$$ Furthermore our assumption $T_0M=\mathbb{R}^{n}$ implies that $df(0)=0$. Now you are taking two sequences $(x_n,f(x_n))\in M$ and $(y_n,f(y_n))$ such that $x_n,y_n\to 0$ and $$\frac{(x_n-y_n,f(x_n)-f(y_n))}{|(x_n-y_n,f(x_n)-f(y_n)|}$$ converges to $w$. By passsing to a subsequence, we can suppose that $$\frac{x_n-y_n}{|x_n-y_n|}$$ converges to a nonzero vector $v\in \mathbb{R}^n\backslash \{0\}$. Then taylor expansion/mean value theorem tells you that $\frac{f(x_n)-f(y_n)}{|x_n-y_n|}$ converges to $0$ (because $df(0)=0$). Hence $$\frac{(x_n-y_n,f(x_n)-f(y_n))}{|x_n-y_n|}\to (v,0).$$ Since $v\neq 0$, it follows that $w$ is colinear to $(v,0)$, hence $w\in \mathbb{R}^n\times \{0\}$.