Understanding a specific step in the Feynman-Kac theorem proof I was looking at a proof of the Feynman-Kac theorem and I don't really understand a passage. The theorem is as follows

Let $k$ be a piecewise continuous function, $g \in C^2(\mathbb{R})$ and $B(t),t>0$ a standard Brownian motion. Then $$w(x,t) = E\left\{g(B(t))\exp\left\{-\int_0^t k(B(s))ds\right\}\vert B(0)=x \right\}$$
is a unique solution to the following Cauchy problem $$\left\{\begin{matrix}
\frac{\partial w}{\partial t} = \frac{1}{2}\frac{\partial^2 w}{\partial t^2} -kw \quad\\
w(x,0)=g(x)
\end{matrix}\right.$$
for $x\in\mathbb{R}$ and $t>0$.

One of the proofs I've seen of this result is the following.
Consider the following identity
$$g(B(t))\exp\left\{-\int_0^t k(B(s))ds\right\} = \\ 
g(B(t))\exp\left\{-\int_{\Delta t}^t k(B(s))ds\right\} + \\
g(B(t))\exp\left\{-\int_{\Delta t}^t k(B(s))ds\right\}\left(\exp\left\{-\int_0^{\Delta t} k(B(s))ds\right\} -1\right)$$
Now, keeping in mind the strong Markov property of Brownian motion and letting $\mathcal{A}_{\Delta t} = \sigma\{B(s), s \leq \Delta t \}$, we have that
$$w(x,t) = \\ 
E\left\{E\left\{g(B(t))\exp\left\{-\int_{\Delta t}^t k(B(s))ds\right\} | \mathcal{A}_{\Delta t}\right\}\right\} + \\ 
E\left\{E\left\{g(B(t))\exp\left\{-\int_{\Delta t}^t k(B(s))ds\right\}\left(\exp\left\{-\int_0^{\Delta t} k(B(s))ds\right\} -1\right) | \mathcal{A}_{\Delta t}\right\}\right\}$$
(in this step we just apply the law of conditional expectation)
Following on, the last expression equals
$(1)$ $$w(x,t) = \\ 
E\left\{E\left\{ g(B(t-\Delta t) e ^{-\int_0^{t-\Delta t}k(B(s))ds}\right\}| B(\Delta t) + x\right\} + \\
E\left\{ \left( e^{-\int_0^{\Delta t}k(B(s))ds} -1\right)E\left\{ g(B(t-\Delta t))e^{-\int_0^{t-\Delta t}kB(s))ds}|B(\Delta t) +x \right\}\right\}$$
which can be written as
$(2)$ $$E\{ w(x+B(\Delta t), t - \Delta t)\} + E\left\{\left( e^{-\int_0^{\Delta t}k(B(s))ds} -1\right)w(x+B(\Delta t), t - \Delta t) \right\} = \\
E\left\{ \left( w(x,t) + B(\Delta t)\frac{\partial w}{\partial x} + \frac{1}{2}B^2(\Delta t) \frac{\partial^2 w}{\partial x^2}-\Delta t \frac{\partial w}{\partial t}\right) (1-\Delta tk(x))\right\} + o(\Delta t)=\\
w(x,t) + \frac{1}{2}\Delta t\frac{\partial^2 w}{\partial x^2} - \Delta t\frac{\partial w}{\partial t} - \Delta t k(x)w + o(\Delta t)$$
dividing everything by $\Delta t$ and letting $\Delta t \rightarrow 0$ we show that $w$ satisfies the starting Cauchy problem.
Excuse me for the clumpiness of the notation. Now, to the questions
$a)$ in $(1)$, how exactly was the strong Markov property of Brownian motion used? I know that it states that
$$ P(B(t) \in A|\mathcal{F}_s) = P(B(t) \in A | B(s)) \quad \forall t\geq s \quad A \in \mathcal{B}(\mathbb{R})$$
so I can see how the conditioning to the $\sigma$-algebra was dropped, but what justifies the time shift in the Brownian motion and in the integral bounds?
$b)$ in $(2)$, how is that series expansion made? I can see how it is done for the first summand, but how is it done for the second summand?
 A: This is a try for your first question. I will write $E_x$ to indicate that $B_0=x$. I guess that the random variable
$$\exp \left(-\int_0^{\Delta t} \kappa(B_s) ds \right) - 1$$
is measurable with respect to $\mathcal{A}_{\Delta t}$, and therefore can be taken out from the inner expectation value. In addition, I think that we should have for $0 < \Delta t < t$ almost surely
$$ E_x \left[ g(B_t) \exp \left( - \int_{\Delta t}^{t} \kappa(B_s) d s \right) | \mathcal{A}_{\Delta t} \right] = E_x \left[ g(B_t) \exp \left( - \int_{\Delta t}^{t} \kappa(B_s) d s \right) | B_{\Delta t} \right]  =  E_{B_{\Delta t}} \left[ g(B_t - \Delta t) \exp \left( \int_0^{t-\Delta t} \kappa(B_s) ds \right)\right],$$
and hereby all expressions are well-defined. The first equation should be an application of the Markov property, the second equality is; at least intuitively, very plausible. If you now recall the definition of $w(x,t)$, then all in all this should be sufficient to obtain the first expression of (2).
Can you please briefly describe, where this proof comes from? Any book or research paper? I'm curious to find versions of the Feynman-Kac formula, where $\kappa$ is assumed to be piecewise continuous.
I will also think about your second question later, at least, if it is still relevant for you.
