TITLE: Given a basis of $T_pM (e_i)$. Extend this base to a local orthonormal frame $(E_i)$ with $\nabla E_i (p) = 0 $
QUESTION [5 upvotes]: I have been working this problem almost 3 days, I would appreciate any help or idea:
Let (M,h) be a Riemannian manifold. For every $ p \in M $ and $ (e_1 , ... , e_n)$ basis of $T_pM$. There exists an orthonormal frame in an neighborhood of p $(E_1, ... , E_n)$ , with $E_i (p) = e_i$ and $\nabla E_i (p) = 0 $
Hint: Fix an orthonormal frame $(\overline E_i)$ near p with $\overline E_i (p) = e_i$ and define $E_i = \alpha_i^j\overline E_i $ with $(\alpha_i^j(x))_{ij} \in SO(n)$ and $\alpha_i^j(p)= \delta_i^j$.
What I have got:
The construction of an orthonormal frame $(\overline E_i)$ near p with $\overline E_i (p) = e_i$. Follows from Gram-Schmidt process with no problem.
Defining $E_i= \sum_j \alpha_i^j\overline E_i$ the frame is still orthonormal, that follows from a direct calculation and the fact that  $(\alpha_i^j(x))_{ij} \in SO(n)$ and $\overline E_i (p) = e_i$ because $\alpha_i^j(p)= \delta_i^j$.
Since $h(E_i,E_j)= \delta_i^j$ then: $h(\nabla_X E_i, E_j) + h(E_i,\nabla_X E_j) = 0 $.
So all I have to see is that: 
$h(\nabla_X E_i, E_j) = h(E_i,\nabla_X E_j) $ 
Writing the above equation with the koszul formula and doing the calculations, Using the antisymmetry of Lie bracket and the fact that the inner product is commutative:
$h(\nabla_X E_i, E_j) - h(E_i,\nabla_X E_j) = -h([E_i,E_j],X) $ 
So all at have to see is that in p: $[E_i,E_j](p) = 0$
That the Lie bracket its 0 at p for the basis constructed in this way! I have been trying to justify this from lie bracket proprieties with no luck

REPLY [3 votes]: Here's a different approach (related to Andreas Cap's suggestion).
Take a normal neighbourhood $U$ of $p$. We define $E_i$ in the following way: for $q\in U$, let $v:=\exp_p^{-1}(q)$ and $\gamma_v$ be the geodesic such that $\gamma_v(0)=p$ and $\gamma_v'(0)=v$. Define $E_i(q)$ to be the parallel transport of $e_i$ through $\gamma_v$ from $t=0$ to $t=1$.
By definition of parallel transport, we have $E_i(p)=e_i$ and $(\nabla_{\gamma_v'(t)}E_i)(\gamma_v(t))=0$. In particular for $t=0$, $\nabla_vE_i(p)=0$ for any $v\in \exp_p^{-1}(U)$. Using the $\mathbb{R}$-linearity of $\nabla$, we may rescale $v$ to conclude $\nabla_X E_i(p)=0$ for any $X\in T_pM$.
Furthermore, if $\{e_1,...,e_n\}$ is orthonormal, we have $\langle E_i(q),E_j(q)\rangle=\langle e_i,e_j\rangle=\delta_{ij}$, since parallel transport preserves the inner product, so $\{E_1,...,E_n\}$ is orthonormal in $U$. 
*Obs.: Parallel transport involves solving an ODE. The smoothness of $E_i$ is guaranteed by the theorem of smooth dependence on the initial conditions.