I'm working on calculating the probability distribution of the interarrival time of the Poisson process. The method used in my textbook is very strange I don't understand how the probabilities are calculated. I am familiar with the method used eg. here but not the working below. $ N(t) $ is the Poisson process: $$ P\{N(s) = 1, N(t) = 2\} = P\{\xi_1 \leq s < \xi_2 \leq t < \xi_3\} $$
$$ = P\{\eta_1 \leq s < \eta_1 + \eta_2 \leq t < \eta_1 + \eta_2 + \eta_3\}$$
At this point we have converted the Poisson process into 3 independent, exponentially distributed random variables. But now we have the first conversion of the probability to integrals and I don't understand how it was done:
$$ = \int_{0}^{s} P\{s < u + \eta_2 \leq t < u + \eta_2 + \eta_3\} \lambda e^{-\lambda u} \, du$$
What rule of probability was used? The first inequality has now become the integral and the random variable $ \eta_1 $ has become u in the probability. Is this a well known rule of probablity (and what is it called if so?) or is this somehow a specific property of this problem? And likewise for the next two steps: $$ = \int_{0}^{s} \left( \int_{s-u}^{t-u} P\{t < u + v + \eta_3\} \lambda e^{-\lambda v} \, dv \right) \lambda e^{-\lambda u} \, du$$
$$ = \int_{0}^{s} \left( \int_{s-u}^{t-u} e^{-\lambda(t-u-v)} \lambda e^{-\lambda v} \, dv \right) \lambda e^{-\lambda u} \, du$$
$$ = \lambda^2 e^{-\lambda s} (t - s). $$
I've been trying to understand this for a few days now and haven't managed to make any progress.
After reading more I've found that the rule used in this example is the law of total probability: $$ P\{A\}=\int_{-\infty}^{\infty} P\{A|X=x\}f_X(x) dx $$ First, we notice that the event can be written as: $$ \{\eta_1 \leq s < \eta_1 + \eta_2 \leq t < \eta_1 + \eta_2 + \eta_3\} = \{\eta_1 \leq s\} \cap \{ s < \eta_1 + \eta_2 \leq t < \eta_1 + \eta_2 + \eta_3\} $$ Since $\eta_1$ is exponentially distribution it is non-negative, and the event $\{\eta_1 \leq s\}$ has 0 probability for $\eta_1 > s$ which we can use to adjust the bounds of the integral, therefore we find that: $$= P\{\eta_1 \leq s < \eta_1 + \eta_2 \leq t < \eta_1 + \eta_2 + \eta_3\}$$ $$=\int_{-\infty}^{\infty} P(\{\eta_1 \leq s < \eta_1 + \eta_2 \leq t < \eta_1 + \eta_2 + \eta_3\}|\eta_1=u)f_{\eta_1}(u) du$$ $$=\int_{-\infty}^{\infty} P(\{u \leq s < u + \eta_2 \leq t < u + \eta_2 + \eta_3\})f_{\eta_1}(u) du$$ $$=\int_{0}^{s} P(\{s < u + \eta_2 \leq t < u + \eta_2 + \eta_3\})\lambda e^{-\lambda u} \, du$$
The rule is applied again to the next two equalities in this way as well.