Define the function $ H: \mathbb{Q}\to\mathbb{N}$ as $ H\left(\frac{m}{n}\right)=|m|+|n|$ where $ m$ and $ n$ are relatively prime integers. (By convention $ H(0)=H\left(\frac{0}{1}\right)=1$). We define $ A$ and $ B$ by
$ (x,y)$ is in $ A$ if and only if $ H(x)\le H(y)$.
$ (x,y)$ is in $ B$ if and only if $ H(x)>H(y)$.
Now I will show that this satisfies the conditions.
Lemma. For any number $ a$, there are finitely many values $ b$ such that $ H(b)\le a$.
Proof. First look only at positive $ b$. If $ b=\frac{m}{n}$ then $ m+n\le a$, so $ m\le a$ and $ n\le a$. Each of $ m$ and $ n$ will be of $ 0,1,2,...,a$ so there are $ a+1$ possible values for each, so there are at most $ (a+1)^2$ possible values of positive $ b$. The same applies for negative $ b$, so there are at most $ 2(a+1)^2$, a finite amount, of values $ b$ satisfying $ H(b)\le a$. This completes the lemma.
Now, for a given value of $ y$, there are finitely many values of $ x$ such that $ H(x)\le H(y)$, so on a given horizontal line, there are finitely many rational points in $ A$. Similarily, for a given value of $ x$, there are finitely many values of $ y$ such that $ H(x)>H(y)$, so on a given vertical line, there are finitely many rational points in $ B$, so this partition satisfies the conditions. QED.