In Mícheál Ó Searcóid's Metric Spaces, a mapping $\phi:X\rightarrow Y$ is an isometry from the metric space $\left(X,d\right)$ to the metric space $\left(Y,e\right)$ if, and only if, $e\left(\phi\left(a\right),\phi\left(b\right)\right)=d\left(a,b\right)$ for all $a,b\in X$.
There is practice question that says to show that if there exists an isometry from $\left(X,d\right)$ to $\left(Y,e\right)$, then there exists an isometry from $\left(Y,e\right)$ to $\left(X,d\right)$. I tried to show that the inverse of the mapping $\phi$ was an isometry, but I realized that would only work for mapping $\phi\left(X\right)$ back to $X$ because $\phi$ isn't stated to be surjective. Does this definition of an isometry mean that $\phi$ is surjective?
The result isn't true. To show this, take $X = [0, 1]$ and $Y = \mathbb{R}$. Let $e(x, y) = |x - y|$ and let $d$ be the restriction of $e$ to $[0, 1]\times [0, 1]$.
Then the inclusion map $i:X\to Y$ defined by $i: x\mapsto x$ is an isometry since $e(i(a), i(b)) = e(a, b) = d(a, b)$ for all $a,b \in [0, 1]$.
However, there doesn't exist an isometry from $Y$ to $X$. We can show this by noting that for all $a, b\in [0, 1]$ we have $d(a, b) \leq 1$ and noting that this necessarily implies $$d(\phi(2), \phi(0)) \leq 1 < 2 = e(2, 0)$$ and thus for any map $\phi:Y\to X$ we have $d(\phi(2), \phi(0)) \neq e(2, 0)$.