Issue with Casella&Berger derivation of EM likelihood equality 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
$$

You take on both sides of equation (7.2.18) the expectation w.r.t. $k(\mathbf{x}|\theta^\prime, \mathbf{y})$. Since the LHS doesn't depend on $\mathbf{x}$, nothing changes there. And the RHS of (7.2.19) is obtained because the expectation operator is linear (i.e. $E[X+Y] = E[X] + E[Y]$). So, e.g. the first term in (7.2.19):
$$E[\log L(\theta|\mathbf{y}, \mathbf{X})|\theta^\prime, \mathbf{y}]$$
just means "expectation of $\log L(\theta | \mathbf{y}, \mathbf{x})$ under $k(\mathbf{x}|\theta^\prime, \mathbf{y})$".
