In the following $\simeq$ means homeomorphic and $\sim$ means homotopically equivalent.
In an exercise I was asked to compute the homology of the space $\mathbb{R}^3 \setminus X$, where $X$ is the curve parametrized by $(t,\,t^2,\,t^3)$ with $t\in \mathbb{R}$. Intuition suggests that this is homotopically equivalent to $\mathbb{R}^3 \setminus \mathbb{R}$ (of which I know the homology) because $X$ is diffeomorphic to $\mathbb{R}$.
The question is: is this always true? Is it true that $A\simeq B$ implies $X\setminus A \sim X\setminus B$? Of course $A, \, B \subseteq X$. There are obvious counterexamples such as if you take $X=\mathbb{R}^3, A= \mathbb{R}^3$ and $B$ a $3$-dimensional ball, because $\mathbb{R}^3\setminus B$ would have non trivial $H_2$. Are there cases where it holds?
Thanks in advance for your help.