# Two metric spaces X and Y being isometric implies group of isometries are isomorphic

I have a question regarding isometric spaces and isometries on these spaces in general.

Say I have two metric spaces, two sets X and Y each with their own intrinsic metric, which are isometric (1), ie. there is a distance preserving, bijective function $$\phi: X\rightarrow Y$$ (and vice versa in fact, in my case).

Let $$I(X)$$ and $$I(Y)$$ be the two sets of isometries $$\phi_X :X \rightarrow X$$ and $$\phi_Y: Y\rightarrow Y$$ respectively. With composition, these are obviously groups.

Now, in my book they state that, because of (1), the two groups $$I(X)$$ and $$I(Y)$$ are isomomorphic, but I have trouble understanding why this is. How would I even come up with a group homeomorphism between the two groups to begin with? And what are the consequences of such a fact? Does it mean that the isometries behave in the same way in either of the two spaces?

Take the map$$\begin{array}{rccc}\Psi\colon&I(X)&\longrightarrow&I(Y)\\&f&\mapsto&\phi\circ f\circ\phi^{-1},\end{array}$$whose inverse is$$\begin{array}{rccc}\Psi^{-1}\colon&I(Y)&\longrightarrow&I(X)\\&f&\mapsto&\phi^{-1}\circ f\circ\phi.\end{array}$$