Take an enumeration $\mathcal E:=\{q_n\}_{n\in\mathbb N}$ of $\mathbb Q\cap(0,1)$ satisfying that for each for each $n$ we have that $$0\leq q_n-\frac{m}{M_\mathcal E}m2^{-n-1}<q_n+\frac{m}{M_\mathcal E}m2^{-n-1}\leq1,$$ where $${M_\mathcal E}=\mu\left(\bigcup_{n\in\mathbb N}\left(q_n-m2^{-n-1},q_n+m2^{-n-1}\right)\cap[0,1]\right).$$ Note that if $q_1=\frac12$, we have that $M_\mathcal E\geq\frac m2$. This means that we can find an enumeration $\mathcal E$ satisfying the given conditions by choosing $q_i\in\left[2^{-i},1-2^{-i}\right]$. Since $\frac1n>\frac1{2^{n}}$, it is not that hard to construct such an enumeration.
Now given this enumeration $\mathcal E:=\{q_n\}_{n\in\mathbb N}$, I set $$A:=\bigcup_{n\in\mathbb N}\left(q_n-m2^{-n-1},q_n+m2^{-n-1}\right)\cap[0,1].$$ Note that $0<\mu(A)\leq m$, and take $$B:=\bigcup_{n\in\mathbb N}\left(q_n-\frac{m}{\mu(A)}m2^{-n-1},q_n+\frac{m}{\mu(A)}m2^{-n-1}\right)\cap[0,1].$$