$\mathbb R^2$ is not homeomorphic to $\mathbb R^3$.
Let's try to reproduce the argument.
Suppose there was a homeomorphism $f: \Bbb R^2 \to \Bbb R^3$. Call your line $L \subset \Bbb R^2$. Then it would restrict to a homeomorphism $\Bbb R^2\setminus L \to \Bbb R^3 \setminus f(L)$.
Now, why is $\Bbb R^3 \setminus f(L)$ connected? Why can't the line $f(L)$ be embedded in an extremely bizarre way that causes its complement to be disconnected? (As an example of 'strange embeddings', see the Alexander Horned sphere, an embedding of $S^2$ into $\Bbb R^3$ such that one of two connected components of its complement is not simply connected.)
The way you get around this when $L$ is a point instead of a line is that it's hard to embed a point strangely! A point is a point is a point, and we know that $\Bbb R^3 \setminus \{p\}$ is simply connected for any choice of point $p$. But it's hard to see that $\Bbb R^3 \setminus L$ is connected for any choice of properly embedded real line $L$.
Key fact: "$x$ is a point in topological space $X$" is a property invariant under homeomorphism, whereas "$x$ is a line in topological space $X$" (whatever definition of line you take) is not invariant under homeomorphism.
The argument that $\mathbb{R}$ and $\mathbb{R}^2$ are not homeomorphic goes through because, supposing $\mathbb{R}$ were somehow homeomorphic to $\mathbb{R}^2$ we know the removed point in $\mathbb{R}$ corresponds to a point in $\mathbb{R}^2$. But not so with a line in $\mathbb{R}^2$ corresponding to a line in $\mathbb{R}^3$.
Of course, you could instead of saying remove a line from $\mathbb{R}^2$, remove a copy of $\mathbb{R}$ (a subspace homeomorphic to $\mathbb{R}$. This is now invariant under homeomorphism, however, you have essentially the same problem: a copy of $\mathbb{R}$ in $\mathbb{R}^3$ need not be anything nice, and certainly need not be a line.
Another way of saying this is that the "line" in $\mathbb{R}^3$ can't be chosen by you; it has to be the image of the line in $\mathbb{R}^2$ under the homeomorphism. To show topological spaces $X$ and $Y$ are not homeomorphic, it certainly is not sufficient to remove the same subspace from both (that you pick) and show that the results are not homeomorphic spaces. A counterexample is deleting the open interval $(0,1)$ from $\mathbb{R}$ and $(0,2)$ (homeomorphic topological spaces); the former becomes disconnected; the latter remains connected.