Why is $\mathbb{E}(\phi(X,Y) \mid X) = \mathbb{E}\phi(x,Y)|_{x=X}$ if $X$ and $Y$ are independent? Let $X$ and $Y$ be two independent (real - valued) random variables , both defined on the probability space $(\Omega ,A,P)$
(a)  $E|X| < \infty $ , $E|Y| < \infty $ . Let $g(.):R \to R$ (set of real number) be $g(x) = x + E[Y]$. Show that  $E[X + Y \mid X] = g(X)$.
Solution :  $E[X + Y \mid X] = E[X \mid X] + E[Y \mid X] = X + E[Y] = g(X)$ 
(b) The above situation in general. Let $\phi $ be a function such that $E|\phi (X,Y)| < \infty $  . Let $g(x) = E|\phi (x,Y)|$. Use definition of conditional expectation show that $E[\phi (X,Y) \mid X] = g(X)$
i.e. show that
(i) $g(X)$ is measurable with respect to the sub-$\sigma $-field $\sigma (X) = \{ {X^{ - 1}}(B),B \in \mathcal{B}\} $ , where  $\mathcal{B}$ is the borel $\sigma $-fileld of $R$ 
Solution :   Since $g(X)$ is measurable with respect to $\sigma (g(X))$ and $\sigma (g(X)) \subset \sigma (X)$. Therefore $g(X)$ is measurable with respect to $\sigma (X)$.
(ii) For any $A \in \sigma (X)$ we have $\int\limits_A {\phi (X,Y)dp}  = \int\limits_A {g(X)dp} $
Question : 1)  Part(a) and  Part (b) (i) it true or false ?
        2) How I can Show part  (b) (ii) ?

Thank you.     
 A: Yes, you are right about (a) and (b)(i) (however, for the second part, a somewhat more detailed reasoning why the relation "$\sigma(g(X)) \subseteq \sigma(X)$" holds would be nice.)
Concerning (b)(ii): There are (at) least two possibilities to prove this. 
Hints (Solution I):


*

*For any $A \in \sigma(X)$ there exists a Borel set $B$ such that $A=X^{-1}(B)$, i.e. $$1_A = 1_B(X).$$

*It holds that $$\int 1_A \phi(X,Y) \, d\mathbb{P} = \int 1_B(x) \phi(x,y) \, d\mathbb{P}_{X,Y}(x,y),$$here $\mathbb{P}_{X,Y}$ denotes the distribution of $(X,Y)$ with respect to $\mathbb{P}$.

*By independence, $$\int 1_A \phi(X,Y) \, d\mathbb{P} = \int 1_B(x) \phi(x,y) \, d\mathbb{P}_{Y}(y) \, d\mathbb{P}_X(x).$$

*Conclude.


Hints (Solution II):


*

*Show that the claim holds for $\phi(x,y) = 1_B(x) 1_C(y)$ where $B,C \in \mathcal{B}(\mathbb{R})$ are Borel sets.

*Show that $$\mathcal{D} := \{D \in \mathcal{B}(\mathbb{R}^2); \text{claim holds for} \, \phi(x,y) = 1_D(x,y)\}$$ is a Dynkin system. Conclude that $\mathcal{D} = \mathcal{B}(\mathbb{R}^2)$.

*Use Beppo Levi to extend the statement from simple functions (aka elementary functions) to non-negative measurable functions $\phi$.

*Conclude.

