It's late so I will be brief.
What follows is a construction that lives in $(0,1)$ and behaves as desired; by translating things around, we can get one that works in the entire real line. Let $\{I_n\}$ be an enumeration of the open intervals with rational endpoints in $(0,1)$. Arguing inductively, we can produce two families $\{C_n\}$ and $\{K_n\}$ of fat Cantor sets such that $C_n \subset I_n$ and $K_n \subset I_n$ and $C_n \cap K_n = \emptyset$. Put $A = \cup_n C_n$ and $B = (0,1)\backslash A$.
Now let $I$ be an open interval in $(0,1)$. Then $I$ contains some $I_n$ and, consequently, some $C_n$ and $K_n$. Thus $\lambda(I \cap A) \geq \lambda(C_n) > 0$ and similarly $\lambda(I \cap B) \geq \lambda(K_n) > 0$.
Edit:
The above doesn't quite do the job: I overlooked the fact that the OP wants the additional property that $\lambda(I \cap A) = \lambda(I \cap B)$ for all $I$.
$x<y$
? That is a much more interesting question. What is the context of your question, anyhow? If this is homework, then once more it is not appropriate here. $\endgroup$