The following problem arises in my research of interacting particle systems:

Suppose that $X_1, \ldots, X_n$ are exchangeable real-valued random variables. Let $f,g: \mathbb{R} \to \mathbb{R}$ be Borel measurable functions. For $i \neq j$, is it true that

$$ \mathbb{E} \Big[ f \Big( \mathbb{E} \big[ g(X_i) \Big| X_j \big] \Big) \Big] = \mathbb{E} \Big[ f \Big( \mathbb{E} \big[ g(X_j) \Big| X_i \big] \Big) \Big] ?$$

This result would hold, by the definition of exchangeability, IF we can show that for any random variables $X$ and $Y$,$$\mathbb{E} \big[ g(X) \Big| Y \big] = h(X, Y),$$ for some Borel measurable function $h : \mathbb{R}^2 \to \mathbb{R}$. But is this statement true? Most standard texts only prove that $$\mathbb{E} \big[ g(X) \Big| Y \big] = h^{(X)}( Y),$$ for some Borel measurable function $h^{(X)} : \mathbb{R} \to \mathbb{R}$ that depends on $X$.