Where do these bounds come from? 
Consider two independent random variables $X$ and $Y$. Let $f_X(x) = 1 −
{x\over
2}$
  if $0 ≤ x ≤ 2$ and $0$ otherwise. Let $f_Y (y) = 2 − 2y$ for $0 ≤ y ≤ 1$ and 0
  otherwise. Find the probability density function of $X + Y$.

The solution uses three different parts of the rectangle that is $(0,0),(0,1),(2,0),$ and $(2,1)$.
The parts are $0\le a \le 1$, $1\le a \le 2$ , and $2\le a \le 3$.
Through guesswork and having seen similar problems, I was able to correctly determine that using convolution, the bounds of the integrals in each of these cases respectively was $\int_0^a$, $\int_{a-2}^{a-1}$, and $\int_{a-2}^{1}$.
However, I would like an explanation as to why these are the correct bounds, especially the last two.
 A: For convolution, you want to think about everything as happening along the line $x+y=a$.  Consider that line, and how it relates to the rectangle where $0 \leq x \leq 2$ and $0 \leq y \leq 1$ (i.e. where the joint pdf is non-zero).  If you're setting up your convolutions as $dy$ integrals, you are essentially asking for what values of $y$ the line lies inside the rectangle.  


*

*If $0 \leq a \leq 1$, the line will intersect the rectangle on the bottom and left sides.  The specific points of intersection are $(0,a)$ and $(a,0)$ (plug in $x=0$ and $y=0$ into $x+y=a$, then solve for the other variable), so the integral should go from $y=0$ to $y=a$.  

*If $1 \leq a \leq 2$, the line will intersect the rectangle on the bottom and top sides.  The specific points of intersection are $(a,0)$ and $(a-1,1)$, so the integral should go from $y=0$ to $y=1$ (not $a-2$ to $a-1$ as you stated -- those values would be negative for $1 \leq a \leq 2$).  

*If $2 \leq a \leq 3$, the line will intersect the rectangle on the right and top sides.  The specific points of intersection will be $(a-1,1)$ and $(2,a-2)$, so your integral should go from $y=a-2$ to $y=1$.  


Drawing pictures helps here!
