Show that if $X$ and $Y$ are independent with the same exponential distribution, then $Z= |X - Y|$ has the same exponential distribution $$P\left(Z\le z\right)=P\left(\left|X-Y\right|\le z\right)=P\left(-z\le X-Y\le z\right)=P\left(Y-z\le X\le Y+z\right)$$
This means that, because $\space f(x,y)=f(x)f(y) \space$ as they are independent, we get to calculate this integral:
$$\int _0^{\infty }\:\int _{y-z}^{y+z}\:\left(\lambda e^{-\lambda x}\right)^2dxdy$$
We get
$$\left(e^{\left(-2\cdot \lambda \cdot z\right)}\cdot \left(e^{\left(4\cdot \lambda \cdot z\right)}-1\right)\right)/4$$
Which is not what we want
So where's the mistake?

As mentioned in another answer, you get problems with negative values (you cannot consider $y-z \le 0$ in yur duble integral, for example). We can solve the problem as follows. Consider
\begin{align}
P(X\le Y\text{ and }Y-X\le z)={}&P(X\le Y\text{ and }Y\le X + z)\\
={}&\int_0^\infty dx\,\lambda e^{-\lambda x}\int_x^{x+z}dy\,\lambda e^{-\lambda y}\\
={}&\int_0^\infty dx\,\lambda e^{-\lambda x}\left(e^{-\lambda x} - e^{-\lambda(x+z)}\right)\\
={}&\int_0^\infty dx\,\lambda e^{-2\lambda x}\left(1 - e^{-\lambda z}\right)\\
={}&\frac{1}{2}\left(1 - e^{-\lambda z}\right)
\end{align}
where in the second line we used independence. by symmetry (and the fact that the exponential distribution has no atoms):
$$P(Z\le z) = P(X\le Y\text{ and }Y-X\le z) + P(Y\le X\text{ and }X-Y\le z) = 1 - e^{-\lambda z}.$$
Differentiating we get $f_Z(z) = \lambda e^{-\lambda z}$.
There are probably neater ways to solve this, let me know if you find any.
