Consider the following
Suppose that a simple function $f$ has two representations $$ f=\sum_{k=1}^m a_k 1_{A_k}=\sum_{j=1}^n b_j 1_{B_j} . $$ For $\varepsilon=\left(\varepsilon_1, \ldots, \varepsilon_m\right) \in\{0,1\}^m$, define $A_{\varepsilon}=A_1^{\varepsilon_1} \cap \ldots \cap A_m^{\varepsilon_m}$ where $A_k^0=A_k^c$ and $A_k^1=A_k$. Define similarly $B_\delta$ for $\delta \in\{0,1\}^n$. Then set $f_{\varepsilon, \delta}=\sum_{k=1}^m \varepsilon_k a_k$ if $A_{\varepsilon} \cap B_\delta \neq \emptyset$ and $f_{\varepsilon, \delta}=0$ otherwise. Show that, for any measure $\mu$, $$ \sum_{k=1}^m a_k \mu\left(A_k\right)=\sum_{\varepsilon, \delta} f_{\varepsilon, \delta} \mu\left(A_{\varepsilon} \cap B_\delta\right) $$ and deduce that $$ \sum_{k=1}^m a_k \mu\left(A_k\right)=\sum_{j=1}^n b_j \mu\left(B_j\right) $$
Attempts and thoughts: I tried to argue that the above fact holds when we restrict $\mu$ to all $Q$ such that $Q$ is contained in some $A_\epsilon \cap B_\delta$ and then argue that the equality holds for a pi system, and therefore for the sigma algebra that is generated by it but I do not think that this will be a pi system, and moreover, I don't think the sigma algebra will be big enough here.
I tried arguing by counting elements, to show that $$ \sum_{k=1}^m a_k 1_{\left(A_k\right)}=\sum_{\varepsilon, \delta} f_{\varepsilon, \delta} 1_{\left(A_{\varepsilon} \cap B_\delta\right)} $$ but even with this established, I can't claim $$ \sum_{k=1}^m a_k \mu\left(A_k\right)=\sum_{\varepsilon, \delta} f_{\varepsilon, \delta} \mu\left(A_{\varepsilon} \cap B_\delta\right) $$ because that uses the final result.
I think that my main issue with this is that I can't easily deal with $A \epsilon \cap B_\delta$ as this is not a single intersection but rather $m+n$ many.
On the possible "duplicatness" of the question: Before anyone marks this as a duplicate please note that this is not. All questions I have found on this website seem to just go for the latter result without this vector approach in $\epsilon$ and $\delta$.
Question: How do I proceed/ think about this?
Start from $$ \sum_{\varepsilon,\delta}f_{\varepsilon,\delta}\mu(A_\varepsilon \cap B_\delta)=\sum_{\varepsilon}\sum_{k=1}^m\varepsilon_ka_k \sum_{\delta:A_\varepsilon\cap B_\delta\neq\emptyset}\mu(A_\varepsilon \cap B_\delta). $$ For $\varepsilon\in\{0,1\}^m$, let $B^{(\varepsilon)}=\bigcup_{\delta:A_\varepsilon\cap B_\delta\neq\emptyset} B_\delta.$ By definition, this union is disjoint. Moreover, $$ A_\varepsilon\cap B^{(\varepsilon)}=A_\varepsilon\cap\bigcup_{\delta}B_\delta=A_\varepsilon, $$ since you can split the union according to the cases where $A_\varepsilon\cap B_\delta$ is empty or not. Consequently, $$ \sum_{\varepsilon,\delta}f_{\varepsilon,\delta}\mu(A_\varepsilon \cap B_\delta)=\sum_{\varepsilon}\sum_{k=1}^m\varepsilon_ka_k \mu(A_\varepsilon ). $$ Switching the sums over $k$ and $\varepsilon$, we are reduced to show that for each $k$, $$ \sum_{\varepsilon}\varepsilon_k\mu(A_\varepsilon)=\mu(A_k). $$ Letting $I_k=\{\varepsilon\in\{0,1\}^m,\varepsilon_k=1\}$, one has $\sum_{\varepsilon}\varepsilon_k\mu(A_\varepsilon)=\sum_{\varepsilon\in I_k}\mu(A_k)$ and $\bigcup_{\varepsilon\in I_k}A_\varepsilon=A_k$.