Riemannian metric induced by metric This seems a very basic and useful construction, and yet I cannot find any reference for it. So my questions are, 
1) Is the following definition correct?
2) Is there a simpler construction?
3) Do you know any references where this definition is used/found?
Definition: Let $\mathcal{M}$ be a differentiable manifold on which we have a metric $d:\mathcal{M}\times \mathcal{M}\rightarrow \mathbb{R} $ whose square is twice differentiable on the diagonal $\{(p,q)\in \mathcal{M}\times \mathcal{M}\;|\; p=q\}$. We define a Riemannian metric $g$ as follows. Let $p\in\mathcal{M}$ and $X,Y\in T_p\mathcal{M}$. Let $\epsilon>0$ and pick two curves $\gamma_1,\gamma_2: (-\epsilon,\epsilon)\rightarrow \mathcal{M}$ with 
$$ \gamma_1(0)=\gamma_2(0)=p, $$
$$ \gamma_1'(0)=X,\quad \gamma_2'(0)=Y. $$
Then,
$$g_p(X,Y)=-\frac{1}{2}\frac{\partial^2}{\partial t_1\partial t_2}d^2(\gamma_1(t_1),\gamma_2(t_2)) \Bigg|_{t_1=t_2=0}$$
This works for $X\neq Y$. For $X=Y$ take 
$$g_p(X,X)=\frac{\partial^2}{\partial t_1^2}d^2(\gamma_1(t_1),p) \Bigg|_{t_1=0}$$
Remark
These formulae work in Euclidean space, i.e.
$$\| \gamma_1(t_1)-\gamma_2(t_2)\|^2=t_1^2\|X\|^2+t_2^2\|Y\|^2-2t_1t_2X\cdot Y+...,$$
so taking the 2nd derivatives as specified above will produce the correct scalar products. This leads me to believe that they are correct.
However, my first guess was to take the pushforward of $d$, which I couldn't get to work out. What is the interpretation of the above construction in terms of pushforwards?
 A: I found a possible answer to this in [1], Section 3.2. It goes back to [2].
Actually, the construction there is more general than what I asked for, but it turns out that I should have asked the more general question for my application anyway. However, this answer produces the same result as what I proposed in my original question. As to the answer by Robin Goodfellow, I still don't know whether it is correct; I suspect there might be an error in Petersen's book, but I might be wrong. Anyway, I cannot reconcile the construction there with any examples I know.

Let me summarize the construction given in [1]. Let $d(\cdot||\cdot):\mathcal{M}\times \mathcal{M}\rightarrow \mathbb{R}$ be a smooth function satisfying 
$$d(p||q)\geq 0, \quad \text{and} \quad d(p||q)=0 \;\text{iff}\; p=q.$$
This kind of function is called contrast function or divergence if its Hessian is strictly positive definite. It can fail to obey the symmetry and triangle inequality that would make it a distance function; on the other hand, every smooth distance function is a contrast function, so the original question is also answered by this.
The contrast function $d^{\ast}$ defined by $d^{\ast}(p||q)=d(q||p)$ is called the dual of $d$. A distance function is obviously a self-dual contrast function.
Every contrast function $d$ induces a Riemannian metric $g^{(d)}$ by taking its negative Hessian and an affine connection $\nabla^{(d)}$ by taking an appropriate negative third derivative (check the book for details). It turns out that $d$ and $d^{\ast}$ induce the same metric, i.e. $g^{(d)}=g^{(d^{\ast})}$, but the connections are dual to each other
$$\nabla^{(d^{\ast})}=\left(\nabla^{(d)}\right)^{\ast}.$$
For a distance function $d$, $\nabla^{(d^{\ast})}=\nabla^{(d)}$, which means that $\nabla^{(d)}$ is a metric connection. Thus, for $d$ a distance function we obtain the Levi-Civita connection (the Torsion vanishes in any case, even when $d$ is not a distance function, because the Christoffel symbols are defined by partial derivatives).
Interestingly, [1] also mentions that in [3] the converse of the above construction was proved, i.e. that given a smooth manifold with Riemannian metric and two dual Torsion-free connections, there is a contrast function that induces this structure.

[1] Amari, S.-I., & Nagaoka, H. (2007). Methods of Information Geometry. American Mathematical Soc.
[2] Eguchi, S. (1992). Geometry of minimum contrast. Hiroshima Mathematical Journal, 22, 631–647.
[3] Matumoto, T. (1993). Any statistical manifold has a contrast function. Hiroshima Mathematical Journal, 23, 327–332.
A: First, I recommend not using $d$ for distance when doing differential geometry. Whenever I see it, I think of the exterior derivative, and I end up having to remind myself every few seconds that it's talking about distance. I typically use $r$ or $\mathrm{dist}$ instead.
As for your construction, I have some doubts; using second derivatives seems out of place. Here's the typical construction:

Let $M$ be a smooth manifold with a distance function $\mathrm{dist}$ induced by some Riemannian metric, and let $\gamma^{v_p},\gamma^{w_p}$ be curves on $M$ such that $$\gamma^{v_p}(0)=\gamma^{w_p}(0)=p,~\dot{\gamma}^{v_p}(0)=\gamma^{v_p}_*(\partial_t|_0)=v_p,~\dot{\gamma}^{w_p}(0)=\gamma^{w_p}_*(\partial_t|_0)=w_p.$$ Then, $$|v_p|=\lim_{\delta\rightarrow 0}\frac{\mathrm{dist}(\gamma^{v_p}(\delta),p)}{\delta},~|w_p|=\lim_{\delta\rightarrow 0}\frac{\mathrm{dist}(\gamma^{w_p}(\delta),p)}{\delta},$$ and $$\cos\theta_{v_p,w_p}=\lim_{\delta\rightarrow 0}\frac{\mathrm{dist}(\gamma^{v_p}(\delta),\gamma^{w_p}(\delta))}{\delta}.$$ We put this all together with the classic formula $$\mathrm{g}_p(v_p\otimes w_p)=|v_p||w_p|\cos\theta_{v_p,w_p}.$$

Thus, we can recover the Riemannian structure if it's there. I believe Petersen uses this somewhere in his well-known text on Riemannian geometry.
On the other hand, not all metrics come from Riemannian metrics. For example, the trivial metric will not come from a Riemannian metric.
Why we would be taking the pushforward of the metric is not clear to me. Remember that $\mathrm{dist}_*(v_p\oplus w_q)(f)=(v\oplus w)(f\circ\mathrm{dist})$, where $\mathrm{dist}_*:T_pM\oplus T_qM\to T_{\mathrm{dist}(p,q)}\mathbb{R}$ and $f:\mathbb{R}\to\mathbb{R}$. There doesn't appear to be a useful way to write your construction in terms of the pushforward.
