Homeomorphic metric spaces where the identity map is not a homeomorphism
Take any metric space $(X,d)$ for which there is a bijective discontinuous function $f\colon M\longrightarrow M$ and define $d'(x,y)=d\bigl(f(x),f(y)\bigr)$. Then $f$ is a homeomorphism (actually, it's an isometry) from $(M,d')$ into $(M,d)$. However, the identity is not a homeomorphism from $(M,d')$ into $(M,d)$.
Let $M=\{0\}\cup\left\{\frac1n:n\in\Bbb Z^+\right\}$, and let $d$ be the usual metric on $M$. Define a new metric $d'$ on $M$ as follows:
$$d'(x,y)=\begin{cases} |x-y|,&\text{if }0<x,y<1\text{ or }x=y\text{ or }\{x,y\}=\{0,1\}\\ x,&\text{if }0<x<y=1\\ y,&\text{if }0<y<x=1\\ 1-x,&\text{if }0=y<x<1\\ 1-y,&\text{if }0=x<y<1 \end{cases}$$
This simply interchanges the rôles of $0$ and $1$: the map
$$h:M\to M:x\mapsto\begin{cases} x,&\text{if }0<x<1\\ 1,&\text{if }x=0\\ 0,&\text{if }x=1 \end{cases}$$
is a homeomorphism between $\langle M,d\rangle$ and $\langle M,d'\rangle$ in either direction, but the identity map is not: $0$ is the only non-isolated point with respect to $d$, while $1$ is the only non-isolated point with respect to $d'$.