For example, space $A$ has a metric $\rho$, and its subspace $B\subset A$ has a metric $d$, which happens to have much better properties than $\rho$.


So if $x\_{1},x\_{2}\in A\setminus B$, but they are very close to $B$ such that $\rho\left(x\_{1},B\right)<\varepsilon\_{1}$ and $\rho\left(x\_{2},B\right)<\varepsilon\_{2}$, we prefer to somehow use $d$ to approximately measure the distance between $x\_{1}$ and $x\_{2}$, for example by defining some sort of composite metric such as, roughly speaking,


$$
\rho\_{mod}\left(x\_{1},x\_{2}\right)=\rho\left(x\_{1},y\_{1}\right)+d\left(y\_{1},y\_{2}\right)+\rho\left(y\_{2},x\_{2}\right)
$$


where $y\_{j}:=\underset{y\in B}{\mathrm{argmin}}\rho\left(x\_{j},y\right)\forall j\in\left\{ 1,2\right\}$


I am a physicist, not a mathematician, so I would appreciate any expert advice on a mathematically rigorous roadmap to do this.



Is there any standard procedure to properly define a composite metric?
There exists a theorem--by Hausdorff--about extending subspace metrics, according to which:



> 
> Given a metric space $\ (X\ d),\ $ a closed subset $\ A\subseteq X,\ $ and a metrics $\ \rho\_0\ $ in $\ A\ $ such that metrics $\ \rho\_0\ $ and $\ d\,|\,A\times A\ $ are topologically equivalent (in $\ A$),  there exists a metrics $\ \rho\ $ in $\ X\ $ which is topologically equivalent to $\ d,\ $ and such that $\ \rho\,|\,A\times A = \rho\_0$.
> 
> 
> 


An especially elegant proof was obtained by Henryk Toruńczyk, "[A short proof of Hausdorff’s theorem on extending metrics](http://matwbn.icm.edu.pl/ksiazki/fm/fm77/fm77118.pdf)", *Fund. Math.* **77**
(1972), no. 2, 191–193. MR 47:9559.


(*A search will provide you with more information*).


