Consider two bounded domains $U,V \subset \mathbb{R}^d$ with $U \cap V \neq \emptyset$ and a bounded smooth function $g : \mathbb{R}^d \rightarrow \mathbb{R}$. $W_t$ is Brownian motion started in $x \in U \cap V$ and $\tau_A$ is the first exit time from a set $A \subset \mathbb{R}^d$.
Are the random variables $X(\omega)=\textbf{1}_{\{\tau_U < \tau_V\}}(\omega)$ and $Y(\omega)=E[\int_{0}^{\tau_V}g(W_s+W_{\tau_U}(\omega))ds]$ independent? I want to split the expectation of the product of both, so it would also be enough if they were just uncorrelated.
Intuitively I would say no but I am not able to justify my intuition.
I'm assuming we are working with the definitions,
$$X(\omega) = \mathbb{I}_{\{\tau_U < \tau_V\}}(\omega) \text{ and } Y(\omega) = \mathbb{E}\left[\int_{\tau_U}^{\max\{\tau_U,\tau_V\}} g(W_s(\omega))\,ds\middle|W_{\tau_U}(\omega)\right].$$
Suppose $g$ is a strictly positive function bounded from below by some $\epsilon > 0$. Suppose $U$ and $V$ are closed balls in $\mathbb{R}^d$ with a non-trivial intersection, and $U$ is not a subset of $V$. Then if $X = 0$, $\tau_V \leq \tau_U$, so $\max\{\tau_U,\tau_V\} = \tau_U$. Then,
$$Y = \mathbb{E}\left[\int_{\tau_U}^{\tau_U} g(W_s(\omega))\,ds\middle|W_{\tau_U}(\omega)\right] = 0.$$
However, if $X = 1$, then $\tau_V > \tau_U$. Thus, $\mathbb{E}[\tau_V - \tau_U] > 0$. Then,
$$Y = \mathbb{E}\left[\int_{\tau_U}^{\tau_V} g(W_s(\omega))\,ds\middle|W_{\tau_U}(\omega)\right] \geq \mathbb{E}\left[\epsilon (\tau_V - \tau_U)\middle|W_{\tau_U}(\omega)\right] > 0.$$
Thus,
$$0 = \mathbb{P}\left(Y > 0 \middle| X = 0\right) \neq \mathbb{P}\left(Y > 0\middle| X = 1\right) > 0.$$
We conclude that $X$ and $Y$ are not independent.