finding isometries between tangent spaces Let $(M,g)$ and $(\overline M,\overline g)$ be riemannian manifolds of equal dimension $n$ and let $u:M\rightarrow\overline M$ be an immersion.
Let $p\in M$. 
Then, by choosing positively oriented orthonormal bases for the tangent spaces $T_p M$ and $T_{u(p)}\overline M$, there exist matrix representations for $g$ and $\overline g$ that we can view as linear maps $\mathbb R^n\rightarrow\mathbb R^n$.  

I want to find an isometry between inner product spaces
  $$f:(\mathbb R^n,g_p)\rightarrow(\mathbb R^n,\overline g_{u(p)})$$
  This is motivated by a problem that I am trying to simplify:  
I want to do some computations (pointwise) with
  $$\text{dist}(du,SO(g,\overline g))$$
  where $SO(g,\overline g)_p$ is the set of orientation preserving isometries $T_p M\rightarrow T_{u(p)}\overline M$, so that this reduces to
  $$\text{dist}(du,SO(g,\overline g))=\text{dist}(du\circ f^{-1},SO(n))$$
  I am seeking an explicit description for $f$.
  For example if $\overline M=\mathbb R^n$ with the standard inner product, then such a map would be $\sqrt g$, also see my previous question.
  However, I am clueless how to find such a map for arbitrary $\overline M$.  

As I already stated in my previous question, for the generalization I was looking at the matrix representation of the pullback $u^*\overline g$.  
I have been jumping between the metrics and the euclidean metric on $\mathbb R^n$, yet I did not get anywhere.  
 A: Since $M$ and $\bar M$ have equal dimension $n$, $u$ is in fact a local diffeomorphism, so it is a diffeomorphism in some open neighborhood of $p$ in $M$. 
Now, it is important to note that $g$ and $\bar g$ are in general not isometric at $p$, i.e. in general 
$$\left( u^*\bar g \right)_p \neq g_p \, .$$
One can, however, find a linear map $f_p$ that relates two given orthonormal bases in the tangent spaces. $g$ and $\bar g$ are then isometric at $p$ if and only if $f_p \in O_n$. 
In the following, I will give you a construction that works not just at $p$, but in some neighborhood of it. You were referring to normal coordinates in the other post, so I suppose you actually want something that works not just at $p$ itself. Normal coordinates at $p$ are coordinates on the manifold itself, not in its tangent space at $p$. I suggest you take a look at the proof, where they are constructed, in your favorite differential geometry textbook. Of course, you can evaluate everything at $p$ and get the expressions in the two tangent spaces. 
Now, by Silvester's law of inertia, we can find `orthonormal' coframe fields 
$\theta$ on $U$ and $\bar \theta$ on $u (U)$ (which is open in $\bar M$) such that 
$$g = \theta^T \cdot \delta \cdot \theta \quad \text{and} \quad \bar g = \bar{\theta}^T \cdot \delta \cdot \bar{\theta}$$
on $U$ and $u (U)$, respectively. $\delta$ is just 
$$\delta = \sum_{i,j} \delta_{ij} \, \tilde{e}^i \otimes \tilde{e}^j$$
with dual basis $(\tilde{e}^i)_i$ to the standard basis $({e}_i)_i$ in $\mathbb{R} ^n$. 
To explicitly construct this decomposition for say $g$ in practice, you would usually look at a coordinate representation $\kappa^*g$ of $g$ in a neighborhood of $p$, then diagonalize 
$$\kappa^*g = Y^T \cdot 
\begin{pmatrix}
\lambda_1 & & \\
 & \ddots & \\
& & \lambda_n \\
\end{pmatrix} \cdot Y $$ 
and rescale $Y$ by the square root of the above diagonal matrix $D$. 
This is laborious, but doable (especially with software). You then don't worry any more about the rest of the manifold and restrict yourself to coordinates, which means you identify $g$ with $\kappa^*g$ and thus $\theta$ with $\sqrt{D} \cdot Y$. 
We have 
$$u^*\bar g = (u_*)^T \cdot \bar g \cdot u_* = \left(\bar{\theta} \cdot u_* \right)^T 
\cdot \delta \cdot \left( \bar{\theta} \cdot u_* \right) \, ,$$ 
which we compare with the above expression for $g$. We would have an isometry, if $\theta = \bar{\theta} \cdot u_*$. So if we want a map from $\mathbb{R}^n$ 
to $\mathbb{R}^n$ at each point on $U$, that "measures" how $g$ "differs from" $\bar g$, we set 
$$f = \bar{\theta} \cdot u_* \cdot \theta^{-1} \, .$$
So what does $f$ do? It takes the components of a tangent vector field on $U$ with respect to the given orthonormal frame field and spits out its components with respect to the given orthonormal frame field on $u(U)$. The respective lengths are then computed via the standard inner product $\delta$. 
I leave it to you to translate everything to coordinate expressions. 
