DFA for the language L = { $ \omega = xy \in (a,b)^*\mid |x|_a = |y|_b $ }
Let $w=w_1\dots w_n$ be any word in $\{a,b\}^*$. For $i=0,\dots,n$ consider the values $d_i(w):=|w_1\dots w_i|_a - |w_{i+1}\dots w_n|_b$. We can prove


$d_0(w) = - |w|_b \le 0$,
$d_n(w) = |w|_a \ge 0$,
$d_{i+1}(w) = d_i(w) + 1$ for $i=0,\dots,n-1$.


This implies that there must be some $i$ with $d_i(w) = 0$, and therefore $w\in L$. So $L=\{a,b\}^*$.