[guided]The estimator is an average of independent copies of a single kernel summand, so the first task is to compute the mean of that one summand. Let $(\Omega,\mathcal{F},\mathbb{P})$ be the probability space from the statement, and let $X_1,\dots,X_n: (\Omega,\mathcal{F})\to(\mathbb{R},\mathcal{B}(\mathbb{R}))$ be the independent identically distributed real-valued random variables with common density $f$. Define
\begin{align*}
Y_{h,1}: \Omega \to \mathbb{R}, \qquad Y_{h,1}(\omega)=\frac{1}{h}K\left(\frac{x-X_1(\omega)}{h}\right).
\end{align*}
For each $i \in \{1,\dots,n\}$, define $Y_{h,i}$ by replacing $X_1$ with $X_i$. Then
\begin{align*}
\hat f_h(x) = \frac{1}{n}\sum_{i=1}^{n}Y_{h,i}.
\end{align*}
Because $X_1$ has probability density function $f: \mathbb{R}\to[0,\infty)$ with respect to $\mathcal{L}^1$, expectation against $X_1$ is integration against $f(y)\,d\mathcal{L}^1(y)$. Therefore
\begin{align*}
\mathbb{E}[Y_{h,1}]
=
\int_{\mathbb{R}} \frac{1}{h}K\left(\frac{x-y}{h}\right) f(y)\,d\mathcal{L}^1(y).
\end{align*}
Now use the substitution $u=(x-y)/h$, so $y=x-hu$. Since $h>0$, this affine change of variables maps $\mathbb{R}$ bijectively onto $\mathbb{R}$ and transforms Lebesgue measure by
\begin{align*}
d\mathcal{L}^1(y)=h\,d\mathcal{L}^1(u).
\end{align*}
Substituting gives
\begin{align*}
\mathbb{E}[Y_{h,1}]
=
\int_{\mathbb{R}} K(u) f(x-hu)\,d\mathcal{L}^1(u).
\end{align*}
Finally, expectation is linear and all $Y_{h,i}$ have the same distribution, so
\begin{align*}
\mathbb{E}[\hat f_h(x)]
=
\frac{1}{n}\sum_{i=1}^{n}\mathbb{E}[Y_{h,i}]
=
\mathbb{E}[Y_{h,1}]
=
\int_{\mathbb{R}} K(u) f(x-hu)\,d\mathcal{L}^1(u).
\end{align*}[/guided]