In mathematics, an isometry is a distance-preserving injective map between metric spaces.
(Ref: https://en.wikipedia.org/wiki/Isometry)
Now the argument that you are giving is flawed because $d_X(x, x_1)$ is well defined the moment you gave the metric $d_X(,)$. The isometry respects the metrics in $X$ and $Y$ through the relation $$d_Y(f(a), f(b))=d_X(a,b)\text{ }\forall\text{ } a,b\in X$$ and it does not define the metric $d_Y(,)$.