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.