# Conditional expectation notation

I am learning about Heckman selection model and confused with conditional expectation notation.

If the equation that determines sample selection is:

The outcome equation is:

If error terms have bivariate normal distribution, then:

Can someone explain how it arrived from second to third line? Why are explanatory variables with coefficients written outside the brackets and epsilons are now written inside the conditional expectation brackets?

$$E[y_i \mid u_i \gt -w_i \gamma]$$ $$= E[x^\prime_i \beta + \epsilon_i \mid u_i \gt -w_i \gamma]$$ $$= E[x^\prime_i \beta \mid u_i \gt -w_i \gamma]+E[ \epsilon_i \mid u_i \gt -w_i \gamma]$$
But $x^\prime_i \beta$ is not random here, so $E[x^\prime_i \beta \mid u_i \gt -w_i \gamma] =x^\prime_i \beta$ and this make the expression equal to$$x^\prime_i \beta+E[ \epsilon_i \mid u_i \gt -w_i \gamma]$$