Conditional expectation and regular distribution

I have problem with proving the following fact:

Let $\mu$ be regular version of distribution of random variable $X$ with respect to $\sigma$-algebra $\mathcal{B}$. Let $Y$ be $\mathcal{B}$-measurable random variable. Prove that for any Borel function $\phi$ such that $\mathbb{E}|\phi (X,Y)|<\infty$, we have $$\mathbb{E}(\phi(X,Y)|\mathcal{B})(\cdot) = \int \limits_{\mathbb{R}} \phi(x, Y(\cdot)) \mu(dx, \cdot)\ \ \ \ \ \text{a.s.}$$ How does this equation look like for $X$ independent from $\mathcal{B}$?

I can see that function $\omega \mapsto \int \limits_{\mathbb{R}} \phi(x, Y(\omega)) \mu(dx, \omega)$ is $\mathcal{B}$-measurable, so it would be enough to prove that $$\forall_{B \in \mathcal{B}} \int \limits_{B} \mathbb{E}(\phi(X,Y)|\mathcal{B})(\omega)dP(\omega) = \int \limits_{B} \phi(X(\omega),Y(\omega))dP(\omega) = \\ = \int \limits_{B}\left( \int \limits_{\mathbb{R}} \phi(x, Y(\omega)) \mu(dx, \omega)\right)dP(\omega).$$

First equality is obvious from the definition of conditional expectation, but I have problem with second one.

I would apreciate every help. Thanks!

The proof seems to go by complicating function $\phi$, starting from $\phi=I_{A\times B}$, for $A, B \in \mathcal{B}(\mathbb{R})$.