My answer is completely off. Can you please tell me where did my logic go wrong.
Donald Trump and Tori Black are to meet at a specific time and both will be late by $ \sim Exponential(\lambda), i.i.d. $. What is the cdf of the arrival time difference.
Let $ X, Y$ be the late time and difference be $Z = X - Y$. Cases are $z \geq 0$ and $z < 0 $.
First, for $ z \geq 0$,
$ F_Z(z) = P(Z\leq z) = P(X-Y \leq z) = 1 - P(X-Y > z) = 1 - P(X>Z+Y)$
Z $\geq 0$, so $X \geq 0 $ for all $Y$.
$$\begin{align} F_Z(z) & = 1 - \int_0^\infty(\int_{z+y}^\infty f_{X,Y}(x,y)dx) dy \\& = 1 - \int_0^\infty(\int_{z+y}^\infty \lambda e^{-\lambda y}\cdot\lambda e^{-\lambda x}dx) dy \\& = 1 - \int_0^\infty\lambda e^{-\lambda y}(-e^{-\lambda x}|_{z+y}^\infty) dy \\& = 1 - \int_0^\infty\lambda e^{-2\lambda y}e^{-\lambda z}dy \\& = 1 - e^{-\lambda z}\int_0^\infty \lambda e^{-2\lambda y} \\& = 1 - \frac{1}{2}e^{-\lambda z}\end{align}$$
Now, for $z < 0$, where my calculation went very wrong.
Similarly, $F_Z(z) = 1 - P(X-Y > z) = 1 - P(X>Z+Y) $
$Z < 0$, so for $X \geq 0$, $Y$ should be $Y \geq -Z$, so I do:
$$\begin{align}F_Z(z) & = 1 - \int_{-z}^\infty(\int_{z+y}^\infty \lambda e^{-\lambda y}\cdot\lambda e^{-\lambda x}dx) dy \\& = 1- \int_{-z}^\infty \lambda e^{-\lambda y}\cdot e^{-\lambda (z+y)}dy \\& = 1 - e^{- \lambda z}\int_{-z}^\infty \lambda e^{-2\lambda y}dy \\& = 1 - e^{-\lambda z}\cdot \frac{1}{2}e ^{2\lambda z} \\& = 1 - \frac{1}{2}e^{\lambda z}.\end{align}$$
Hence, my answers for both cases are the same except the $z$ sign.
The correct CDFs are given in textbook as
$F_Z(z) = 1 - \frac{1}{2}e^{-\lambda z}$ for $z\geq 0$ and $\frac{1}{2}e^{\lambda z}$ for $z<0$.
I forgot to integrate $Y$ over $\int_0^{-z}$ for $z<0$, which when included gives the textbook answer.