If two metric spaces are homeomorphic, what more conditions are required so that their balls are homeomorphic? I was talking to a friend about topological homeomorphisms, and the conversation turned to about "sphere" to "cube" homeomorphism in the standard topology. We found this paper which seemed to be quite complicated for showing it. My friend then tried to find an easier solution, and, mistakenly concluded that if two metric spaces are homeomorphic then their balls are also homeomorphic, so the sphere is homeomorphic to a cube trivially because the $d_1$ metric is same as $d_2$ metric on $\mathbb{R^3}$ (topological sense).
We both concluded that this statement should not be generally true because even in a single metric space the balls around different point need not be homeomorphic, so one would have to specify which balls they are talking about in the framing of the above claim.
I tried to account for that problem and frame the following question: If we have a homeomorphism $f,g$ between two metric spaces $X$ and $Y$, when is that the ball centered at a point $x \in X$ is homeomorphic to a ball centered at the point point $f(x) \in Y$?
I would also appreciate discussion on other ways of turning my friends statement into a rigorous true statement other than the above.
 A: There's no difficulty in showing that (Euclidean) balls and cubes are homeomorphic: you just scale. Explicitly, consider the map $[-1, 1]^3 \to D^3$ which multiples a given $(x, y, z) \in [-1, 1]^3$ by $\frac{\text{max}(x, y, z)}{\sqrt{x^2 + y^2 + z^2}}$ (and sends the zero vector to the zero vector). The same argument shows that the balls of any two norms on $\mathbb{R}^n$ are homeomorphic.
Metric spaces arising from norms on $\mathbb{R}^n$ have the quite special property that balls centered at any point of any radius are homeomorphic (by translation and then scaling symmetry). In an arbitrary metric space there's no reason anything like this should be true, so it's not even clear how to interpret "their balls are homeomorphic" as a condition: which balls and which other balls?
So one might instead ask when a homeomorphism $f : X \to Y$ between two metric spaces induces a homeomorphism between balls centered at $x \in X$ and balls centered at $f(x) \in Y$ for all $x \in X$. I am aware of no general condition guaranteeing this weaker than the condition that there exists some strictly increasing function $g : \mathbb{R}_{\ge 0} \to \mathbb{R}_{\ge 0}$ such that
$$d_Y(f(x), f(x')) = g(d_X(x, x')).$$
This condition guarantees that $f$ restricts to a homeomorphism from balls of radius $r$ to balls of radius $g(r)$ for all $r \ge 0$. The simplest version of this condition is that $g(r) = r$ which gives that $f$ is an isometry.
If we restrict our attention to normed vector spaces then more can be said; I believe the appropriate generalization of the first paragraph is that the balls of any two equivalent norms on a vector space are homeomorphic, via the appropriate generalization of the scaling map above.
