In the explanation of the EM (Expectation maximization) algorithm p.328 in the book "Statistical inference" by G. Casella and R. Berger, 2nd edition, they present the following:
$\mathbf{Y} = (Y_1, ..., Y_n)$ is the observed (incomplete) data.
$\mathbf{X} = (X_1, ..., X_n)$ is the missing (augmented) data.
The EM algorithm allows us to maximize $L(\theta|\mathbf{y})$ by working with only $L(\theta|\mathbf{y}, \mathbf{x})$ and the conditional pdf or pmf of $\mathbf{X}$ given $\mathbf{y}$ and $\theta$, defined by $$ \begin{align} &L(\theta|\mathbf{y}, \mathbf{x}) = f(\mathbf{x}, \mathbf{y}|\theta)\\ &L(\theta|\mathbf{y}) = g(\mathbf{y}|\theta)\\ &k(\mathbf{x}|\theta, \mathbf{y}) = \dfrac{f(\mathbf{x}, \mathbf{y}|\theta)}{g(\mathbf{y}|\theta)} \quad (7.2.17) \end{align} $$
Rearrangement of the last equation in (7.2.17) gives the identity
$$\begin{align} \log L(\theta|\mathbf{y}) = \log L(\theta| \mathbf{y}, \mathbf{x}) - \log k(\mathbf{x}| \theta, \mathbf{y}) \quad (7.2.18) \end{align}$$ As $\mathbf{x}$ is missing data and hence not observed, we replace the right side of (7.2.18) with its expectation under $k(\mathbf{x}|\theta', \mathbf{y})$, creating the new identity
\begin{align} \log L(\theta|\mathbf{y}) = E[\log L(\theta|\mathbf{y}, \mathbf{X})|\theta', \mathbf{y}] - E[\log k(\mathbf{X}| \theta, \mathbf{y})|\theta', \mathbf{y}] \quad (7.2.19) \end{align}
I don't understand how why the RHS in (7.2.18) is equal to the RHS in (7.2.19), how can one show this?
Edit
I realize now that I am particularly confused regarding what should be seen as variables and constants in equations (7.2.17-7.2.19). The beginning of the quoted section that I added in my edit that says "pdf or pmf of $\mathbf{X}$ given $\mathbf{y}$ and $\theta$" makes it seem like $\mathbf{y}$ and $\theta$ should be treated as constants. Given this, identity (7.2.18) could be written as
$$
C = h(\mathbf{x}) \quad (*)
$$
where $C$ is the constant LHS of (7.2.18) and $h(\mathbf{x})$ is the RHS of (7.2.18). But since $h(\mathbf{x})$ is a constant $C$, then indeed
$$
E[h(\mathbf{x})|\theta', \mathbf{y}] = E[C|\theta', \mathbf{y}] = C
$$