The random variable $K$ has an $\it\text{Exp} \space(\lambda)$ distribution. For a given value of $K$, the random variable $X$ has a $\it\text{Poisson}\space (K)$ distribution.
$(i)$ Obtain an expression for $E[X|K]$.
$(ii)$ Hence, calculate $E[X]$.
I'm afraid I don't know how to work with this stuff. It doesn't make any sense to me. I attempted it in this manner -
$(i)$ If $K=k$, then $X$~$\it\text{Poisson}\space (k)$. And so, $E[X|K=k]=k$.
$(ii)$ $E[X]=E[E[X|K=k]]=E[k]=?$ (which should actually be $\frac1\lambda)$
I'm also not convinced why not $E[X] = E[X|K]=k$.
(Also, I'm not sure about anything I've done)
You're on the right track. Because $E(X \mid K = k) = k$ for all $k > 0$, then $E(X \mid K) = K$, and $$E(X) = E(E(X \mid K)) = E(K) = \frac{1}{λ}.$$