I need a small hint:
Suppose $\mathbf{g} : (a,b) \to \mathbb{R}^n$ is a differentiable parametrized curve and that for some point $\mathbf{p} \in \mathbb{R}^n$ we have $\lVert \mathbf{g}(t_0)-\mathbf{p} \rVert \le \lVert \mathbf{g}(t)-\mathbf{p} \rVert$ for all $t \in (a,b)$. Prove that $\mathbf{g}'(t_0) \cdot (\mathbf {t_0}-\mathbf{p})=0$.