This result can be generalized to an arbitrary countable set $A \subset \mathbb{R}^2$. Since $A = \mathbb{Q}^2$ is countable, and there exist uncountably many lines in $\mathbb{R}^2$ through the point $x$, there must exist a line $\ell_1$ through $x$ that does not intersect the set $A$. Analogously, there exists a line $\ell_2$ through $y$ such that $\ell_2$ does not intersect $A$. Let $\ell_1$ and $\ell_2$ intersect at $p \in \mathbb{R}^2 - A$ and choose the path $x\to p \to y$.