What is the relation between the expectation of product of two random variables ($E[XY]$) and their conditional expectation ($E[X|Y]$)? No assumption is being made regarding any variable or the relation between the variables.
Consider the following derivation for discrete case (continuous case will be similar):
\begin{align*} E[XY] &= \sum_{x,y} x y P(X=x, Y=y)\\ &= \sum_{x,y} x y P(X=x|Y=y) P(Y=y)\\ &= \sum_{y} y \sum_{x} x P(X=x|Y=y) P(Y=y)\\ &= \sum_{y} y E[X|Y=y] P(Y=y)\\ &= E[YE[X|Y]] \\ &= E[Y]E[X|Y] \end{align*}
Please point out if there is an error. Thanks!