For simplicity, I'll consider only discrete sample space.
My work so far:
Let $Y$ and $W$ be random variables on a sample space $S$, which has a probability distribution $P$. So the probability of an event $s\in S$ is $P(s)$.
Definition: $E(Y|W)$ is a random variable defined on $S$ such that for all $s\in S$, $$ E(Y|W)(s):= \begin{cases} \sum_{y\in\text{ran $Y$}} yP(Y=y|W=W(s)), &\text{if $P(W=W(s))\ne 0)$}\\ 0, &\text{otherwise} \end{cases}. $$
I am now trying to show that $E(Y) = E(E(Y|W))$. What I've done so far is the following. $$ \begin{align} \text{RHS} &=\sum_{\bar y\in\text{ran $E(Y|W)$}}\bar yP(E(Y|W)=\bar y)\\ &=\sum_{\bar y\in\text{ran $E(Y|W)$}} \bar y\sum_{s\in S}P(s) I_{E(Y|W) = \bar y} (s)\\ &=\sum_{s\in S: P(W=W(s))\ne 0} P(s)\sum_{y\in\text{ran $Y$}}yP(Y=y|W=W(s))\\ &= \sum_{y\in\text{ran $Y$}} y\sum_{s\in S:P(W=W(s))\ne 0} P(Y=y|W=W(s)) P(s) \end{align} $$
Now I have no idea how to further proceed. Any help?