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.
Thank you for any kind of help you might provide.