EDIT: This gives $\lambda (A\cap (x,y))>0$ and $\lambda(B\cap (x,y))>0$ for each interval $(x,y)$. We cannot have equality $\lambda (A\cap (x,y))=\lambda(B\cap (x,y))$ in general (see Mike Hall's answer).