[guided]We now compute the spatial Laplacian while freezing the time variable $t$. This means $g(t)$ is treated as an ordinary Riemannian metric on $M$, and the time derivative of the metric plays no role in this step.
Choose normal coordinates for $g(t)$ at the fixed point $p$. Let $\nabla^{g(t)}$ denote the Levi-Civita connection of $g(t)$, and define the Christoffel symbols $\Gamma_{ij}^k: U \to \mathbb{R}$ by
\begin{align*}
\nabla^{g(t)}_{\partial_{x_i}}\partial_{x_j}
=
\sum_{k=1}^n \Gamma_{ij}^k\,\partial_{x_k}.
\end{align*}
In these coordinates, at $p$ we have $g_{ij}=\delta_{ij}$ and $\Gamma_{ij}^k=0$. These coordinates simplify the calculation at the point, but the quantities being computed are tensorial, so the final identity does not depend on this choice.
For the scalar function $u$, the first covariant derivative agrees with the coordinate derivative, so $u_i=\partial_{x_i}u$. The Hessian components are
\begin{align*}
u_{ij}
=
(\operatorname{Hess}_{g(t)}u)_{ij}
=
\nabla_i\nabla_j u.
\end{align*}
At $(p,t)$, the squared gradient is
\begin{align*}
|\nabla u|_{g(t)}^2
=
\sum_{i=1}^n u_i^2.
\end{align*}
At the point $p$, applying the Laplace-Beltrami operator means taking the trace
\begin{align*}
\Delta_{g(t)}
=
\sum_{k=1}^n\nabla_k\nabla_k
\end{align*}
in this normal frame. Therefore
\begin{align*}
\Delta_{g(t)}|\nabla u|_{g(t)}^2(p,t)
=
\sum_{k=1}^n\nabla_k\nabla_k\left(|\nabla u|_{g(t)}^2\right)(p,t)
=
\sum_{k=1}^n\nabla_k\nabla_k\left(\sum_{i=1}^n u_i^2\right)(p,t).
\end{align*}
The equality $|\nabla u|_{g(t)}^2=\sum_i u_i^2$ is being used only at $p$, where the normal frame is orthonormal; away from $p$, the expression includes the components $g^{ij}$.
Applying the product rule to each term in the sum gives
\begin{align*}
\Delta_{g(t)}|\nabla u|_{g(t)}^2 = 2\sum_{i,k=1}^n(\nabla_k u_i)^2 + 2\sum_{i=1}^n u_i\sum_{k=1}^n\nabla_k\nabla_k u_i.
\end{align*}
Because $u_i=\nabla_i u$ and $\nabla_k u_i=\nabla_k\nabla_i u=u_{ki}$, the first term is exactly
\begin{align*}
2\sum_{i,k=1}^n u_{ik}^2 = 2|\operatorname{Hess}_{g(t)}u|_{g(t)}^2.
\end{align*}
The second term is where curvature enters. We use the Laplace-Beltrami sign convention
\begin{align*}
\Delta_{g(t)}f
=
\operatorname{tr}_{g(t)}\operatorname{Hess}_{g(t)}f
\end{align*}
for scalar functions $f: M \to \mathbb{R}$. We also use the Riemann curvature tensor convention
\begin{align*}
R(X,Y)Z
=
\nabla_X\nabla_YZ-\nabla_Y\nabla_XZ-\nabla_{[X,Y]}Z,
\end{align*}
with Ricci curvature obtained by tracing the first and third slots. This convention determines the sign of the curvature term in the commutation formula below.
Let us verify the commutation formula rather than treating it as a black box. At $p$, the coordinates are normal for $g(t)$, and covariant second derivatives of the scalar function $u(\cdot,t): M \to \mathbb{R}$ commute. Therefore
\begin{align*}
\sum_{k=1}^n\nabla_k\nabla_k\nabla_i u
=
\sum_{k=1}^n\nabla_k\nabla_i\nabla_k u.
\end{align*}
Now the derivatives are acting on the covector field $\nabla u$, whose components are $u_i$. Commuting the two covariant derivatives on this covector field gives
\begin{align*}
\sum_{k=1}^n\nabla_k\nabla_i\nabla_k u
=
\sum_{k=1}^n\nabla_i\nabla_k\nabla_k u
+
\sum_{k,\ell=1}^n(R_{g(t)})_{k i k \ell}u_\ell.
\end{align*}
The first term is $\nabla_i\Delta_{g(t)}u$ by the sign convention for $\Delta_{g(t)}$, while the curvature trace is the Ricci tensor component $\sum_{k=1}^n(R_{g(t)})_{k i k \ell}=(\operatorname{Ric}_{g(t)})_{i\ell}$. Hence
\begin{align*}
\sum_{k=1}^n\nabla_k\nabla_k\nabla_i u
=
\nabla_i\Delta_{g(t)}u
+
\sum_{\ell=1}^n(\operatorname{Ric}_{g(t)})_{i\ell}u_\ell.
\end{align*}
Substituting this identity into the second term produces
\begin{align*}
2\sum_{i=1}^n u_i\sum_{k=1}^n\nabla_k\nabla_k\nabla_i u = 2\sum_{i=1}^n u_i\nabla_i\Delta_{g(t)}u + 2\sum_{i,\ell=1}^n(\operatorname{Ric}_{g(t)})_{i\ell}u_i u_\ell.
\end{align*}
By the coordinate expression for the metric [inner product](/page/Inner%20Product) and for the Ricci tensor pairing, this is
\begin{align*}
2\sum_{i=1}^n u_i\sum_{k=1}^n\nabla_k\nabla_k\nabla_i u = 2\langle \nabla u,\nabla\Delta_{g(t)}u\rangle_{g(t)} + 2\operatorname{Ric}_{g(t)}(\nabla u,\nabla u).
\end{align*}
Combining the Hessian term with these two terms gives
\begin{align*}
\Delta_{g(t)}|\nabla u|_{g(t)}^2 = 2|\operatorname{Hess}_{g(t)}u|_{g(t)}^2 + 2\langle \nabla u,\nabla\Delta_{g(t)}u\rangle_{g(t)} + 2\operatorname{Ric}_{g(t)}(\nabla u,\nabla u).
\end{align*}[/guided]