Show that the class of regular languages is closed under shuffle
Suppose, we have a simple string like $w = a_1b_1$ then what I understand you want to do is process $a_1$ in $D_A$ then jump to initial state of $D_B$ using $\epsilon$-transition and the process $b_1$ in $D_B$ but we don't know where $a_1$ ends and $b_1$ starts. So using non determinism we check all possibilities of where $a_i$ can end and $b_i$ can start. 


To do that we start with a combined starting state $(q_A,q_B)$. 
We have all the states possible by making $Q = Q_A \times Q_B$
Now we two kind of transitions from any state from $Q$ first we make transition in $D_A$ ignoring the transition in $D_B$ that way we can handle the case where the symbol is part of $a_i$. In a similar way we will add second kind of transitions assuming symbol is part of $b_i$.


Going this way there won't be any possibility left unchecked.


  How does it detect whether we are at DFA A OR B?


we don't have a marker between $a_i$ and $b_i$ so we make 2 guess at every state. First, The symbol is part of $a_i$ or $b_i$ we are currently in and second, that the current symbol is first symbol of the next $b_i$ if we currently checking $a_i$ and next $a_{i+1}$ if currently checking $b_i$