Let the length of an interval $I$ be $|I|.$
A subset $B\subset \mathbb{R}$ is called a null set if for any $\varepsilon>0,$ there exists a sequence of open intervals $(I_n)_{n\in\mathbb{N}}$ such that $B\subseteq\bigcup_{n\in\mathbb{N}}I_n$ and $\sum_{n\in\mathbb{N}}|I_n|<\varepsilon.$
A subset $A\subseteq\mathbb{R}$ is of first category if $A=\bigcup_{n\in\mathbb{N}}A_n$ where $A_n$ is nowhere dense set.
Oxtoby stated the following theorem:
Theorem: The real line $\mathbb{R}$ can be decomposed into two disjoint union of first category set $A$ and null set $B$.
Idea of Proof: Let $\mathbb{Q}=\{p_n:n\in\mathbb{N}\}.$ Fix $i,j\in\mathbb{N}.$ Let $I_{i,j}$ be intervals containing $p_n$ of length $1/2^{i+j}.$ Then $A=\bigcap_{j\in\mathbb{N}}\bigcup_{i\in\mathbb{N}}I_{i,j}$ is a null set while $B = \bigcup_{j\in\mathbb{N}}\bigcap_{i\in\mathbb{N}}I_{i,j}^c$ is of first category.
Question: What is an intuition behind the construction of $A$ and $B?$ When I tried to prove the theorem on my own, I would not know that $A$ and $B$ are constructed as above.
Any help is appreciated.
EDIT: According to Dave's comment, the decomposition is due to Lebesgue outer measure being $G_{\delta}.$ However, I think that there should be a more elementary way to construct the decomposition.
In particular, given that $\mathbb{R}$ can be decomposed into disjoint union of null set and set of first category, how do we construct them solely from their definitions?