Let S$S$ be a subset of the reals such that S∩[a,b]$S \cap [a,b]$ and Sc∩[a,b]$S^c \cap [a,b]$ cannot be written as a countable union of closed sets for any a<b$a < b$. This can be done (this explicit example of a non-Borel setexplicit example of a non-Borel set achieves this). Let ℚ$\mathbb{Q}$ be the rationals. Then, A=(Sxℚ)U(Scxℚc)$A = (S \times \mathbb{Q}) \cup (S^c \times \mathbb{Q}^c)$ and B=(Sxℚc)U(Scxℚ)$B = (S \times \mathbb{Q}^c) \cup (S^c \times \mathbb{Q})$ should do it.
The proof is as follows. Suppose that the curve t→(f(t),g(t))$t \to (f(t),g(t))$ lies in A$A$, and consider a closed bounded interval I$I$. As the curve lies in A$A$, f(I)∩S = f(I∩g-1(ℚ))=∪x∈ℚf(I∩g-1(x))$$f(I) \cap S = f(I \cap g^{-1}(\mathbb{Q})) = \bigcup_{x \in \mathbb{Q}} f(I \cap g^{-1}(x))$$ is a union of countably many closed sets. By the choice of S$S$, f(I)$f(I)$ must be a single point. Hence, f$f$ is constant. Then, g$g$ is a continuous function mapping into either ℚ$\mathbb{Q}$ or ℚc$\mathbb{Q}^c$, so is also constant. So A$A$ is totally path disconnected. The argument for B$B$ follows in the same way by exchanging S$S$ and Sc$S^c$.