Which metric spaces have this superposition property? Let $A \subset X$ and $B \subset X$ be two isometric subsets of a metric space $X$.  So there is an isometry $f: A \to B$.
Say that a metric space $X$ has the superposition property (my terminology) if, for every pair of isometric subsets $A$, $B$, there is an isometry of $X$, $F: X \to X$, that superimposes $A$ onto $B$:  $F(A) = B$, i.e. $F$ places $A$ on top of $B$.

Which metric spaces have this superposition property?

Euclidean space $\mathbb{E}^d$ has this property.
But it seems the punctured plane does not: e.g. if $A$ is the point $(1,0)$ and $B$ is the point $(-2,0)$, then (I believe) there is not an isometry of the whole punctured plane that maps $A$ onto $B$.
Has this property been studied before?  If so, under what name?
I am (clearly) unschooled in this area. Thanks for pointers and/or examples!
 A: A very natural concept arises if you should insist that $A$ and
$B$ are small in some way, such as insisting that they are finite.
For example, the countable random graph under the shortest-path metric satisfies this version of the superposition property.
The reason is that any partial isomorphisms of two finite induced
subgraphs of the random graph extends to an automorphism of the
random graph. (Meanwhile, the random graph does not have the full superposition property, since it is isomorphic to a proper subset of itself.)
We might define that a metric space has the
$\omega$-superposition property, if any isometry of finite
subspaces entends to an isometry of the whole space with itself.
More generally, a space has the $\kappa$-superposition property,
for a cardinal $\kappa$, when isometries of subspaces of size less
than $\kappa$ extend to isometries of the whole space with itself.
This is a natural instance of what is known in model theory as a
homogeneous structure, a structure for which any partial
isomorphism of finitely generated substructures extends to an
automorphism of the entire structure. This is essentially what is
going on in your case, if you should restrict to finite $A$ and
$B$ (and if also you should insist that the larger isometry $F$ agree with $f$ on $A$). More generally, we have the concept of a $\kappa$-homogeneous
structure, for a cardinal $\kappa$, which means that any partial
isomorphism of substructures of size less than $\kappa$ extends to
an automorphism.
For example, structures arising as a Fraisse limit are always
homogeneous. Also, every saturated structure is
homogenous.
A: If you restrict sets A, B to be simply points, then you are asking for spaces which have the property that for all points A,B\in X there exists an isometry T from X onto X so that T(A)=B (am I understanding you correctly?). Such spaces are called transitive. It is known that if a finite dimensional space is transitive then it is isometric to a Euclidean space, I think that this is a result of Mazur. It is an old, still open problem, whether every separable transitive Banach space is isometric to a Euclidean space. This problem is called Banach-Mazur problem and it goes back to 1930's. There has been a lot of work on this problem and it is connected to other interesting problems.
If you require that every 2 points can be mapped by a surjective isometry onto any other 2 points with the same distance, then I think the space is called 2-transitive. Similarly one defines n-transitive. I believe, but I am not 100% certain that 2-transitive Banach spaces have to be isometric to a Euclidean space. You might check work of V. Mascioni.
A: If the metric space is locally compact and intrinsic, then you get only spheres, Euclidean spaces and hyperbolic spaces.
[See Metric methods in Finsler... by Busemann and Sur certaines classes d'espaces... by Tits (1955); thanks to Linus for the reference]
Without assuming local compactness, the same conclusion holds assuming local uniqueness of geodesics [See Metric foundations of geometry. I by Birkhoff].
Without this extra assumption you also get the so-called universal $\mathbb{R}$-trees of finite valence; they are complete, but not separable.
If the metric is not intrinsic you get discrete spaces and yet Cantor-like spaces build on them (who knows what else).
Comments

*

*In the Urysohn universal space $\mathbb{U}$ the property holds for compact subsets; that is, any distance-preserving map $K\to\mathbb{U}$ defined on a compact subset $K\subset  \mathbb{U}$ can be extended to an isometry $\mathbb{U}\leftrightarrow\mathbb{U}$.


*The real projective space is not three-point-homogeneous --- a closed geodesic contains three points on equal distance from each other, and there is an isometric three-point set that does not lie on a closed geodesic.


*See also a related question.
A: Like Euclidean geometry, also hyperbolic geometry has this extension property:  an isometry defined on any subset extends to an isometry of the whole space.  As I recall from long ago, in the book
Busemann & Kelly Projective Geometry and Projective Metrics
it is shown (among that class of geometries) there are very few of these spaces.  
A: There is a paper Globalization of the partial isometries of metric
spaces and local approximation of the group of
isometries of Urysohn space by A. M. Vershik.
It gives stronger results for Urysohn.
It also contains "Hrushevski’s theorem" type results. Which are different from what OP wanted. But maybe still interesting.
