Find $X,Y\subseteq \Bbb{R}$ such that there are $f\colon X\to Y$ and $g\colon Y\to X$, both bijective and continuous but $X\not\cong Y$. I came across the following problem:

Let $\Bbb{R}$ be the euclidean space. Find $X,Y\subseteq \Bbb{R}$  such that there are maps $f\colon X\to Y$ and $g\colon Y\to X$, both bijective and continuous but $X\not\cong Y$ ($X$ not homeomorphic to $Y$).

The structure for a proof that I'm thinking is fairly obvios: Find the sets, find the maps, find a topological invariant that one holds that the other doesn't, QED. Easier said than done. I tried the sets $\Bbb{R}$, $[0,1]$ but can't really find a bijective, continuous map (of course, the points $a,b$ are the ones that are causing trouble since I allready know how to do these for the set $(a,b)$, of course this set doen's work since $\Bbb{R}\cong (a,b)$).
I'm not being able to make much progress in this one. Any hints on how to find the sets/maps are apreciated.
 A: Let $X=A\cup C$ and $Y=A\cup B\cup C$ where
$$A=\mathbb Q\cap(-\infty,0),$$
$$B=\{1/2,2/3,3/4,\dots\}\cup\{1\},$$
$$C=\{2,3,4,\dots\}.$$
$X\not\cong Y$ because, in $Y$, the point $1$ is a limit of isolated points; in $X$ the set of isolated points is closed.
Take any bijection $f:X\to Y$ such that $f(x)=x$ for all $x\in A$; such $f$ is continuous because $C$ is a closed discrete subset of $X$.
To get a continuous bijection $g:Y\to X$ take $g=g_A\cup g_B\cup g_C$ where $g_C(x)=x$ for $x\in C$, and $g_B(x)=-x$ for $x\in B$, and $g_A:A\to A\setminus g_B[B]$ is a homeomorphism.
To see that $A\cong A\setminus g_B[B]$ we can use Sierpiński's theorem (see K. Ciesielski or A. Dasgupta) which says that any countable (nonempty) metric space with no isolated points is homeomorphic to $\mathbb Q$. Alternatively, since the topologies (induced by the topology of the real line) of those two spaces are the same as their order topologies, it will suffice to observe that they are order-isomorphic, in consequence of Cantor's isomorphism theorem.
