Let $g: \mathbb R^d \to \mathbb R$ be twice differentiable. Fix $y \in \mathbb R^d$ and $k \in \{1, 2, \ldots, d\}$. I would like to compute $\frac{\partial^2}{\partial x_k^2} g(y-x)$. I'm sorry for being pedantic. This is not to accidentally hide any subtle mistake. Could you verify if I apply the chain rule correctly?
We define $f: \mathbb R^d \to \mathbb R$ by $f(x) := g(y-x)$. Let $\{e_1, e_2, \ldots, e_d\}$ be the standard basis of $\mathbb R^d$. Let $\partial f (x)$ and $\partial^2 f (x)$ respectively denote the first-order and second-order Fréchet derivatives of $f$ at $x$. Then $$ \frac{\partial^2}{\partial x_k^2} g(y-x) = \frac{\partial^2}{\partial x_k^2} f(x) = \partial^2 f (x)[e_k, e_k]. $$
Let $h:\mathbb R^d \to \mathbb R^d, x \mapsto y-x$. Let $I_d:\mathbb R^d \to \mathbb R^d$ be the identity map. Then $f = g \circ h$ and $\partial h (x)=-I_d$. We have $$ \begin{align} \partial f (x) &= \partial g (h(x)) \circ \partial h (x) \quad \text{by by chain rule} \\ &= -\partial g(y-x). \end{align} $$
Then implies $\partial f = - (\partial g) \circ h$. Then $$ \begin{align} \partial^2 f (x) &= \partial (\partial f) (x) \\ &= \partial (-\partial g) (h(x)) \circ \partial h (x) \quad \text{by by chain rule} \\ &= - \partial^2 g (h(x)) \circ (-I_d) \\ &= \partial^2 g (h(x)) = \partial^2 g(y-x). \end{align} $$
It follows that $$ \frac{\partial^2}{\partial x_k^2} g(y-x) = \frac{\partial^2}{\partial z_k^2} g(z) \bigg |_{z=y-x}. $$