Could someone help me understand this equality?
Let $\xi$ be a random variable.
$\int_B(\frac{1}{P(B)}\int_B\xi dP)dP=\int_B \xi dP$ for any event $B$.
How do we go from the integral over an event $B$ of the conditional expectation to the unnormalized conditional expectation over such event.
The random variable you integrate, namely, $C:=\frac{1}{P(B)}\int_B\xi dP$, is actually constant hence its integral on $B$ is simply $P(B)C$, which is the right hand side of your equality.