Define $X_0$ and $X_1$ to be two independent positive random variables that follow exponential distributions with parameters $\lambda_0$ and $\lambda_1$, respectively. Let $\tau$ and $\delta$ be two positive constants. Assume that $\delta < \tau$.
My goal is to find $ \mathbb{P}\left\{ X_0 < \tau, X_1 \ge \frac{ (\tau- X_0) (\delta+1) }{ \delta- (\tau-X_0 ) } \right\} $.
My question concerns the following step that I saw a reference using it:
$$ \mathbb{P}\left\{ X_0 < \tau, X_1 \ge \frac{ (\tau- X_0) (\delta+1) }{ \delta- (\tau-X_0 ) } \right\} = \int_0^\tau \mathbb{P} \left\{ X_1 \ge \frac{ (\tau- x) (\delta+1) }{ \delta- (\tau-x) } \right\} f_{X_0}(x) \, dx = \int_0^{\tau-\delta} f_{X_0}(x) \, dx + \int_{\tau-\delta}^\tau \mathbb{P} \left\{ X_1 \ge \frac{ (\tau- x) (\delta+1) }{ \delta- (\tau-x) } \right\} f_{X_0}(x) \, dx,$$ where $f_{X_0}(x)$ is the PDF of $X_0$.
Is the above (especially the second equality) correct ? if so, why ?