For what metric spaces $X$ do we have $(A^\varepsilon)^\varepsilon=A^{2\varepsilon}$ for every $A \subseteq X$? Let $X=(X,d)$ be a metric space. For a subset $A$ of $X$ and $\varepsilon \ge 0$, define the $\varepsilon$-enlargement of $A$ by $A^\varepsilon := \{x \in X \mid \text{dist}(x,A) \le \varepsilon\}$, where $\text{dist}(x,A) := \inf_{a \in A} d(x,a)$. It is easy to show that $(A^\varepsilon)^\varepsilon \subseteq A^{2\varepsilon}$.
Question
For what kind of metric spaces $X=(X,d)$ does it hold that $(A^\varepsilon)^\varepsilon = A^{2\varepsilon}$ for every $\varepsilon > 0$ and non-empty subset $A$ of $X$ ?
Notes


*

*Of course, the equality holds trivially for (normed) linear spaces.

*If it helps, in the above question "every subset" may be replaced with "every closed subset".


Motivating example
To see why $(A^\varepsilon)^\varepsilon$ may be strictly contained in $A^{2\varepsilon}$, let $\delta > 0$, $\delta/2 \le \varepsilon < \delta$, and take the two-point space $X := \{0,\delta\}$ equiped with the distance $d(x,y) := |x-y|$, and consider the singleton subset $A := \{0\}$. BTW, $A$ is closed because singletons are closed in metric spaces. Now, it's clear that $A^\varepsilon=\{0\}=A$, and so $(A^\varepsilon)^\varepsilon = A \ne X$. However, $A^{2\varepsilon} = \{0,\delta\} = X$.
 A: Definition. A metric space $(X,d)$  has transitive neighborhoods if for each subset $A$ of $X$ and each $\varepsilon > 0$, $(A^\varepsilon)^\varepsilon = A^{2\varepsilon}$.
Theorem. A metric space $(X,d)$ has transitive neighborhoods iff for each $x,y\in X$ and each $\delta>0$ there exists a point $z\in X$ with $d(x,z), d(y,z)<d(x,y)/2+\delta$.
Proof. ($\Rightarrow$). Let $x,y$ be any points of $X$ and $\delta>0$ be any number. Put $A=\{x\}$ and $\varepsilon=d(x,y)/2$. Then $y\in A^{2\varepsilon}=(A^\varepsilon)^\varepsilon$. Since 
$$\varepsilon+\delta>\varepsilon\ge\operatorname{dist}(y, A^\varepsilon)=
\inf_{z\in A^\varepsilon} d(y,z),$$
there exists a point $z\in A^\varepsilon$ such that $d(y,z)<\varepsilon+\delta$.
($\Leftarrow$). Let $A$ be any subset of $X$ and $\varepsilon >0$ be any number. The inclusion $(A^\varepsilon)^\varepsilon\subset A^{2\varepsilon}$ follows from the triangle inequality. Conversely, let $y\in A^{2\varepsilon}$ be any point, $m$ be any natural number, and $\delta=\varepsilon/(3\cdot 2^m)$. There exist a point $x\in A$ with $d(x,y)<2\varepsilon+\delta$ and a point $z\in X$ with $$d(x,z), d(y,z)<d(x,y)/2+\delta/2<\varepsilon+\delta.$$ By induction we can build a sequence $\{x_n\}$ of points of $X$ such that $x_0=x$ and $$d(x_{n-1}, x_n), d(z, x_n)<d(x_{n-1}, z)/2+\delta/2^n$$ for each $n\ge 1$. It follows that for each $n$ we have $d(x_n,z)<(\varepsilon+(n+1)\delta)/2^n$ and so $$d(x_n,y)\le (x_n,z)+d(z,y)<(\varepsilon+(n+1)\delta)/2^n+\varepsilon+\delta.$$ The triangle inequality implies that 
$$d(x, x_n)\le\sum_{i=1}^n d(x_{i-1},x_i)< \sum_{i=1}^n d(x_{i-1},z)/2+\delta/2^i< \sum_{i=1}^n (\varepsilon+i\delta)/2^i+\delta/2^i=\varepsilon(1-2^n)+3\delta,$$ where $3=\sum_{i=1}^\infty (i+1)/2^i$.  Indeed, let $S$ be the sum of this series. Since $$S-1=\sum_{i=1}^\infty (i+1)/2^i-1/2^i=\sum_{i=1}^\infty i/2^i=\sum_{i=0}^\infty (i+1)/2^{i+1}=1/2+S/2,$$ we have $S=3$. It follows $d(x, x_m)< \varepsilon(1-2^m)+3\varepsilon/(3\cdot 2^m)=\varepsilon,$ so $x_m\in \{x\}^\varepsilon\in A^\varepsilon$.  We have $d(x_m,y)<\varepsilon(1+(m+1)/(3\cdot 2^m))/2^m+1+/(3\cdot 2^m))$. The right hand side of this inequality tends to $\varepsilon$ when $m$ tends to the infinity, which follows $y\in (A^\varepsilon)^\varepsilon$. $\square$
Corollary 1. A complete metric space has transitive neighborhoods iff it is a length space.
Proof. See [L, Lemma 2.2.1].
Corollary 2. A complete and locally compact metric space has transitive neighborhoods iff it is geodesic. 
Proof. See [L, Lemma 2.2.1 and Theorem 2.2.4].
Corollary 3. If a metric space $(X,d)$ has transitive neighborhoods then for each $x,y\in X$ and each $\delta>0$ there exists a natural number $n$ and a sequence $x=x_1,\dots, x_n=y$ of points of $X$ such that $d(x_i,x_{i+1})<\delta$ for each $i=1,\dots n-1$. $\square$.
References
[L] Urs Lang, Length Spaces  (version of November 4, 2013).
