I need help verifying and completing my solution to problem 2.1.19 of Hatcher's book Algebraic Topology.
Calculate the homology groups of the subspace of $I \times I$ consisting of its 4 boundary edges and all the points in its interior with rational first coordinate.
Here is my partial solution: Let $X$ be the given space, let $Y$ be the top and bottom edge, and let $Z = I \cap \mathbb{Q}$. We have $H_k(Y) = 0$ for $k > 0$, so $H_k(X) \approx H_k(X, Y)$ for $k>1$ using the long exact sequence for the pair $(X, Y)$. Note that $(X, Y)$ is a good pair (i.e. $Y$ is a deformation retract of a neighbourhood in $X$), and $X/Y$ is the suspension $SZ$. Therefore, $H_{k+1}(X, Y) \approx \widetilde H_{k+1}(X/Y) \approx \widetilde{H}_k(Z)$, using the relationship between the homology of a space and the homology of its suspension. This gives $H_{k+1}(X) \approx \widetilde{H}_k(Z)$ for $k>0$. The latter is $0$ since $Z$ is totally disconnected, so $X$ has trivial homology in dimensions 2 and above. I don't see an easy way to continue for dimension $1$. Any hints would be appreciated.
This space can be described as $$ X = \{(x,y) \in I \times I : x \in \mathbb{Q}\}. $$
Take $A = \{(x,y) \in X : y < 3/4 \}$ and $B = \{(x,y) \in X : y > 1/2\}$ open sets. The lower and upper edges of $I \times I$ are deformation retracts of $A$ and $B$ respectively, so both $A$ and $B$ are contractible. Their intersection is
$$ A \cap B = \{(x,y) \in X : x \in \mathbb{Q} , y \in (1/2,3/4) \} \simeq I \cap \mathbb{Q}, $$
the homotopy given by collapsing each interval to its midpoint. In particular we see that $$H_k(A \cap B) \simeq \bigoplus_{q \in I \cap \mathbb{Q}} H_k(\{q\})$$ for each $k$. Since a point is trivially contractible, the intersection has trivial homology for positive degrees and $H_0(A \cap B) \simeq \mathbb{Z}^{(\mathbb{N})}$.
Thus, using Mayer-Vietoris we have the following exact sequence of reduced homology:
$$ 0 \to \widetilde{H}_1(X) \to \widetilde{H}_0(A \cap B) \to \widetilde{H}_0(A) \oplus \widetilde{H}_0(B) \to \widetilde{H}_0(X)\ \to 0. $$
Since both $A$, $B$ and $X$ are path connected their (reduced) homology at degree zero vanishes, so
$$ \widetilde{H}_1(X) \simeq \widetilde{H}_0(A \cap B) \simeq \mathbb{Z}^{(\mathbb{N})} $$
and thus $H_1(X) \simeq \mathbb{Z}^{(\mathbb{N})}$.