Given the function \begin{equation} P(x,t) := \sup\limits_{t \le \tau \le T} E\left( g(X^{t,x}_{\tau}) \right) \end{equation} where $X^{t,x}$ is the unique solution to the SDE \begin{equation} X_u = x + \int\limits_t^u \mu(X_s, s) \, ds + \int\limits_t^u \sigma(X_s, s) \, dB_s \end{equation} for $x >0$, $t \in [0,T]$, $u \in [t,T]$ and $\tau$ is a stopping time with $P(\tau \in [t,T]) =1$ and $g$ is a continuous R-valued function.
Then we have for the process $X = X^{0,s}$ (defined analogously) \begin{equation} P(X_t, t) = \text{ess sup}_{t \le \tau \le T} E\left(g(X_{\tau}) \, | \, \mathcal{F}_t \right) \end{equation} where $\mathcal{F}_t = \sigma(B_s: s \in [0,t])$.
I found this statement but I don't know how to argue correctly to get that relation. Somehow the expectation in the definition of the function $P$ is conditioned on $X^{t,x}_t = x$ which is obviously an a.s.-event, but what happens when I have a random variable instead of a deterministic $x$? And how do I get the equality of the supremum and the essential supremum?
Maybe you can have a look at my attempt I have figured out so far: \begin{align} P(X_t, t) & = \sup\limits_{t \le \tau \le T} E\left( g(X^{t,X_t}_{\tau}) \right) \\ & = \sup\limits_{t \le \tau \le T} E\left( g(X^{t,X_t}_{\tau}) \, | \, X^{t,X_t}_t = X_t \right) \\ & = \sup\limits_{t \le \tau \le T} E\left( g(X^{t,X_t}_{\tau}) \, | \, X_t \right) \\ & \text{(Is the expected value $E( \cdot \, | \, X^{t,X_t}_t = X_t)$ really equal to the conditional expectation $E( \cdot \, | \, X_t)$? If so, how do I argue here precisely?)} \\ & = \sup\limits_{t \le \tau \le T} E\left( g(X_{\tau}) \, | \, X_t \right) \\ & \text{(flow property of solutions to the SDE)} \\ & = \sup\limits_{t \le \tau \le T} E\left( g(X_{\tau}) \, | \, \mathcal{F}_t \right) \\ & \text{(Markov property of solutions to the SDE)} \\ & = \text{ess sup}_{t \le \tau \le T} E\left( g(X_{\tau}) \, | \, \mathcal{F}_t \right) \\ & \text{(???)} \end{align} Has anyone an idea how to get the a.s. equality of $\sup$ and ess sup? I think the key to that is the measurability of the sup, but I have no idea how to prove that for the set of stopping times.