Let $(M,g)$ be a Riemannian manifold. Let $p$ be a point in $M$, and suppose we create a diffeomorphism between the tangent space at $p$ and a small neighborhood of $p$ in $M$. Is it then true that the distance between $q$ and $p$ is $\langle v,v\rangle$, where $v=p-q$ in the tangent space, where we use the exp map to locate $q$ in the tangent space?
Just to give a reference for "any book on Riemannian geometry": A proof of the above (and much more) can be found in do Carmo's Riemannian Geometry.
Your question is answered in chapter 3; In particular paragraph 3 of this chapter treats minimizing properties of geodesics.