Solution (source code)

= Solution

The <residual lifetime process>, or excess process, is
$$
\boxed{E(t)=S_{N(t)+1}-t}.
$$
If the inter-renewal distribution is non-arithmetic and $0<\mu=\mathbb E\xi_1<\infty$, then the <renewal excess limit theorem> says
$$
E(t)\xrightarrow{d}E_\infty,
\qquad
\boxed{
\mathbb P(E_\infty>x)
=\frac1\mu\int_x^\infty\mathbb P(\xi_1>y)\,dy
}.
$$
Equivalently, $E_\infty$ has the law of $U\widehat\xi$, where $U$ is uniform on $(0,1)$ and independent of the size-biased inter-renewal time $\widehat\xi$.