I have one questions about the simplification steps of Equation 3.3.6 in the Chapter 3.3.1 in Most Harmless Econometrics. We know that $$ \delta_R = \frac{E \{ (D_i - E[D_i|X_i]) E[Y_i|D_i, X_i] \}}{E[(D_i - E[D_i|X_i])^2]}, \tag{1} $$ and $$ E[Y_i|D_i, X_i] = E[Y_i|D_i=0, X_i] + \delta_X D_i, \tag{2} $$ where, \begin{align*} \delta_X &\equiv E[Y_{1i}|X_i, D_i=1] - E[Y_{0i}|X_i, D_i=0] \\ &= E[Y_{i}|X_i, D_i=1] - E[Y_{i}|X_i, D_i=0], \end{align*}
Now, we substitute (2) into the numerator of (1), and get \begin{align*} E \{ (D_i - E[D_i|X_i]) E[Y_i|D_i, X_i] \} &= E \{ (D_i - E[D_i|X_i]) E[Y_i|D_i=0, X_i] \} \\ &\quad + E \{ (D_i - E[D_i|X_i]) \delta_X D_i \} \end{align*} The first term on the RHS is zero because $D_i - E[D_i|X_i]$ is uncorrelated with $E[Y_i|D_i=0, X_i]$. My question is how to simplify the second term such that $$ E \{ (D_i - E[D_i|X_i]) \delta_X D_i \} = E \{ (D_i - E[D_i|X_i])^2 \delta_X \} $$