# Expectation of killed subordinator at first-passage time

I am reading Fluctuations of Levy Processes with Applications by A.E. Kyprianou and I am having struggles understanding a part in the proof of theorem 5.6. Let $$Y$$ be a subordinator and $$\mathbf{e}$$ an independent exponential random variable with parameter $$\eta$$. Let $$X$$ be the killed subordinator associated with $$Y$$ and $$\mathbf{e}$$, i.e., the stochastic process defined by $$X_t = \begin{cases} Y_{t}, & \text{if } t<\mathbf{e}\\ \partial & \text{if } \mathbf{e}\geq t, \end{cases}$$ where $$\partial$$ is a cemetery point. Let $$\tau_x^+$$ be the first-passage time at $$x$$, that is, $$\tau_x^+ = \inf\{t>0: X_t>x\}.$$ In the proof of the aforementioned theorem, the following equality is stated without any explanation: $$\mathbb{E}\left[f(X_{\tau_x^+}-x)g(x-X_{\tau_x^+-})\right]=\mathbb{E}\left[\int_{[0,\infty)}\int_{(0,\infty)}e^{-\eta t}\phi(t,\theta)N(dt\times d\theta)\right]$$ where $$f$$ and $$g$$ are two continuous functions vanishing at infinite with $$f(0)=g(0)=0$$, $$N$$ is the Poisson random measure associated with $$Y$$ and $$\phi$$ is defined by $$\phi(t,\theta)= 1_{(Y_{t-}\leq x)}1_{(Y_{t-}+\theta> x)}f(Y_{t-}+\theta- x)g(x-Y_{t-}).$$ I would like to ask if anyone would have a bit of insight into why this is true.

I have found the proof of the same theorem in other resources (for example, in Bertoin's Levy Processes), but they all use the same equality without any argumentation so as to why it is true. I can see why the equality is true in the case when $$Y$$ is a compound Poisson process with drift, and I feel like I could get the result by a limiting argument, but I feel like there should be a more direct way of seeing this.

Because $$f(0)=g(0)=0$$, the passage over $$x$$ is being counted in $$\Bbb E[f(X_{\tau_x^+}-x)g(x-X_{\tau_x^+-})]$$ iff $$X$$ jumps at the crossing time. And \eqalign{ 1_{\{\Delta X_{\tau_x^+}>0\}}f(X_{\tau_x^+}-x)g(x-X_{\tau_x^+-}) &=\sum_{t\in J}1_{\{t<\mathbf{e}\}}1_{\{X_{t-}\le x, X_t>x\}}f(X_{t}-x)g(x-X_{t-})\cr &=\sum_{t\in J}1_{\{t<\mathbf{e}\}}1_{\{X_{t-}\le x, X_t>x\}}f(X_{t-}+\Delta X_t-x)g(x-X_{t-})\cr &=\sum_{t\in J}\phi(t, \Delta X_t). \cr } Here $$J:=\{t>0: X_{t-}\not= X_t\}$$. In effect, on $$\{\Delta X_{\tau_x^+}>0\}$$, the time $$\tau_x^+$$ is the unique element $$t$$ of $$J$$, before $$\mathbf{e}$$, with $$Y_{t-}\le x$$ and $$Y_{t}>x$$.