Suppose there exist embeddings $f:X\to Y$ and $g:Y\to X$. Show by means of an example that $X$ and $Y$ need not be homeomorphic.
I set $X=(0,1)$ and $Y=(0,\frac{1}{2})\cup (\frac{1}{2}, 1)$. I think $f:X\to Y$ defined by $f(x)=\frac{x}{2}$ is an embedding, correct? Also, clearly $g:Y\to X$ defined by $g(y)=y$ is an embedding. But as $X$ is connected and $Y$ is disconnected, there is no homeomorphism between them.
Is this okay?