Let $X_1,\ldots,X_n$ be i.i.d. random variables with common density $f$. Let $K(\cdot)$ be a probability density function defined on the real line. Then for a nonstochastic $h$:
$$E[\hat{f}]=\frac{1}{nh}\sum_{i=1}^n E\left[K\left(\frac{x-X_i}{h}\right)\right]$$ $$=\frac{1}{h}E\left[K\left(\frac{x-X_i}{h}\right)\right]=\frac{1}{h}\int K\left(\frac{x-u}{h}\right)f(u)du$$ $$=\int K(y)f(x+hy)dy$$
I'm having trouble to understand how they get the two last equalities. Since $K$ is a probability density function
$$\frac{1}{h}E[K\left(\frac{x-X_i}{h}\right)]=\frac{1}{h}\int K\left(\frac{x-X_i}{h}\right)d\left(\frac{x-X_i}{h}\right)$$
but I had a density that is function of another density.
Anyone can help me understood that?
First, you know that for a (bounded, measurable) function $g$, you have $$ \mathbb{E}[g(X_i)] = \int g(u) f(u)\, du $$ So, set $g(u) = K\left(\frac{x - u}{h}\right)$ and the first confusion is settled.
For the second, use the change of variables $y = \frac{x - u}{ h}$.