The correct statement is: “A bijection f
M,
d) -> (N,
e) that preserves distances in the sense that for all p,q in M, e(f(p),f(q))=d(p,q).”
Note the different metrics. In other words the metric d(,) and the metric e(,) need not be the same.
I think that that is the source your confusion.
Here is another. What you want is to define a relation on the set of metric spaces as (M,d) and (N,e) are related if and only if there is an isometry between them.
In other words, the two are related iff they are isomorphic.
Clearly (M,d) is isomorphic to itself. Use the identity mapping.
If (M,d) and (N,e) are isomorphic then because the mapping is bijective, (N,e) and (M,d) are isomorphic.
As always, the transitive property is the difficult one to prove.
If f
M,d) -> (N,e) & g
N,e) -> (Q,c) are bijections then the composition gof is also a bijection.
Note that if for all p,q in M, e(f(p),f(q))=d(p,q) then c(g(f(p)),g(e(f(p)))=e(f(p),f(q))=d(p,q).
Thus gof is an isometry between (M,d)& (Q,c).