Solution (source code)

= Solution

The <Levi-Civita connection> is also a <metric connection>, so
$$
u\,g(v,w)=g(\nabla_uv,w)+g(v,\nabla_uw),
$$
and similarly for the two cyclic permutations. Add the identities with leading derivatives $u$ and $v$, subtract the one with leading derivative $w$, and use
$$
\nabla_vu=\nabla_uv-[u,v],
\quad
\nabla_uw=\nabla_wu+[u,w],
\quad
\nabla_vw=\nabla_wv+[v,w].
$$
Cancellation and symmetry of $g$ give
$$
u(g(v,w))+v(g(u,w))-w(g(u,v))
=2g(\nabla_uv,w)-g([u,v],w)+g(v,[u,w])+g(u,[v,w]).
$$
This is the <Koszul formula> written with the bracket terms on the right.