Density of random variable $Y = Z - X$ I have a probability problem.
Need to find density of random variable $Y = Z - X$. 
Random variables $X$ and $Z$ are independent. $X$ has exponential distribution with parameter $3$. $Z$ has uniform distribution on $[0,2]$.
I know determinations of used values.
I know this formula:
$$f_{\xi_1+\xi_2}(t)=\int_{-\infty}^\infty f_{\xi_1}(u)f_{\xi_2}(t-u)\ du=\int_{-\infty}^\infty f_{\xi_2}(u)f_{\xi_1}(t-u)\ du$$
But how should I use it?
Am I right that density will change only on $[0,2]$?
Could you help me to understand how to solve this type of problems? It seems I have a problem with understanding random values at all. 
 A: 
Am I right that density will change only on [0,2]?

No; not quite.   The maximum value of $Z-X$ is $2$, but the minimum is a somewhat less than $0$.   You are, however, right in that you need to heed the supports of the density functions.
$$\begin{align}
\tag{1} & X\perp Z, X\sim\mathcal{Exp}(3), Z\sim\mathcal{U}[0;2], Y=Z-X
\\[2ex]
\tag{2} f_X(x) & = 3 e^{-3x} \mathbf 1_{0\leq x\lt \infty} 
\\[1ex]
\tag{3} f_Z(z) & = \tfrac 1 2 \; \mathbf 1_{0\leq z\leq 2}
\\[3ex]
\tag{4a} f_Y(y) & = \int_{-\infty}^{+\infty} f_X(z-y)\cdot f_Z(z)\operatorname d z \;\mathbf 1_{-\infty< y\leq 2} 
\\[1ex]
\tag{4b} & = \int_{-\infty}^{+\infty} 3 e^{-3(z-y)} \mathbf 1_{0\leq z-y\lt \infty}\cdot \tfrac 1 2 \; \mathbf 1_{0\leq z\leq 2}\;\operatorname d z \;\mathbf 1_{-\infty< y\leq 2} 
\\[1ex]
\tag{4c} & = \tfrac 3 2\int_{-\infty}^{+\infty} e^{3(y-z)} \mathbf 1_{\max(y,0)\leq z\leq 2}\;\operatorname d z \;\mathbf 1_{-\infty< y\leq 2} 
\\[1ex]
\tag{4d} & = \tfrac 3 2 e^{3y}\left(\int_0^2 e^{-3z} \operatorname d z \;\mathbf 1_{-\infty<y<0} + \int_y^2 e^{-3z}\operatorname d z \; \mathbf 1_{0\leq y \leq 2} \right)
\\[1ex]
\tag{4e} & = \tfrac 3 2 e^{3y}\left(\tfrac 1 3(1-e^{-6})\;\mathbf 1_{-\infty<y<0} + \tfrac 1 3(e^{-3y}-e^{-6})\; \mathbf 1_{0\leq y \leq 2}\right)
\\[1ex]
\tag{4f} & = \tfrac 1 2e^{3y}(1-e^{-6})\;\mathbf 1_{-\infty<y<0} + \tfrac 1 2(1-e^{3y-6})\; \mathbf 1_{0\leq y \leq 2}
\\[3ex]
\tag{4'}f_Y(y) & =\begin{cases} \tfrac 1 2 e^{3y}(1-e^{-6}) & \mbox{if } y\lt 0
\\[1ex] \tfrac 1 2(1-e^{3y-6}) & \mbox{if } 0\leq y \leq 2
\\[1ex] 0 & \mbox{elsewhere}
\end{cases}
\end{align}$$
Steps 1,2,3 restate what you've been given, and includes the density functions, and support, of $X$ and $Y$.   A support is, as you know, the interval where each density function is non-zero, indicated here using indicators; which have value of $1$ when the subscript is true, and $0$ elsewhere.
$$\mathbf 1_{a<w<b} =\begin{cases} 1 & \mbox{if } a<w<b \\ 0 & \mbox{elsewhere}\end{cases}$$
Step 4a expresses the density of $Y$ as the convolution of the density functions of $X$ and $Z$, and notes that the support of $Y$ is $-\infty \lt Y \leq 2$.
Steb 4b uses substitution, from 2 and 3.   Step 4c rearranges and combines the support with respect to $z$.
Step 4d splits the support for $y$ and uses the resulting support for $z$ as bounds for the integrals.
Then we evaluate these definite integrals and simplify.
Step 4' simply expresses the result as a piecewise function.
A: Just a guess.
First of all, what is your pdf/cdf for exponential? Is it the same as the one on Wikipedia?
Anyway, try using MGFs. Check this and that out.
$M_{Z-X}(t) = M_Z(t)M_X(-t)$
where $M_Z(t) = \frac{1-e^{3t}}{3(1-e^t)}$ and $M_X(t) = (1-t/3)^{-1}$ (I think? It depends on your pdf/cdf for exponential).
Make the appropriate substitutions. See if the resulting mgf matches anything in the (this) link above.
A: Let Y be a continuous random variable equal to the difference of the continuous random variables Z and X.  To compute $f_Y(y)$ we integrate $f_{ZX}(z,x)$ along the line where $z-x = y$ or $x = z-y$.
Then $$f_Y(y) = \int_{-\infty}^{\infty} f_Z(z).f_X(z-y)dz $$
$$f_Y(y) = \int_{0}^{2} \frac{1}{2}.3e^{-3(z-y)}dz , 0\le z\le2$$
$$ = 0, elsewhere$$
