Prove: The set $B=\{x\in \Bbb R\mid x^2\in\Bbb Q\}$ is countable
I have this idea but I'm not sure if it's correct:
We know $\Bbb Q$ is countable so we can list $\Bbb Q$ as $\Bbb Q= \{ q_1,q_2,q_3,\ldots,q_n \mid n \in \Bbb N\}$ On the other hand $x^2=a$ has finite solutions ($0$, $1$, or $2$)
Let $A_i= \{x\mid x^2= q_i, q_i \in \Bbb Q, i \in \Bbb N\}$ following the order of $\Bbb Q$.
Let $S= \bigcup_{i=1}^\infty A_i $ And S is a countable union of countable sets. Hence S is countable
Enumerate the members of $\mathbb Q$, thus: $q_1,q_2,q_3,\ldots\,{}$.
List the solutions of $x^2 = q_1$ (either $0$, $1$, or $2$ of them according as $q_1$ is negative, $0$, or positive), then those of $x^2=q_2$, then those of $x^2=q_3$, and so on. That gives you an enumeration of $\{x\in\mathbb R\mid x^2\in\mathbb Q\}$.