You have the joint PDF for $X$ and $Y:$ $$ f_{X,Y}(x,y)= \begin{cases} 2& 0\leq y\leq x\leq1\\ x& \text{otherwise} \end{cases} $$
It looks like
The problem is my textbook somehow lists out 5 regions, and gives the complete CDF. I don't how it knows there are only these 5 possible cases.
- Case 1: $x<0\quad \text{or}\quad y<0$, $F=0.$
- Case 2: $0\leq y\leq x\leq 1$, $F=\int^y_x\int^x_v2\,du\,dv=2xy-y^2$.
- Case 3: $0\leq x\leq 1\quad \text{and}\quad x\leq y$, $F=\int^x_0\int^2_v2\,du\,dv=x^2$. I don't get why the second integral goes from $0$ to $x,$ how can $y$ be greater than $x$?
- Case 4: $0\leq y\leq 1\quad \text{and} \quad 1\leq x$, $F=\int^y_0\int^1_v2 \, du \, dv=2y-y^2$
- Case 5: $1<x\quad \text{and} \quad 1<y, F=1$
So I basically have two questions, one, how do you know these are all the possible cases? two, how to determine the limit of integration for case 3

The random variable (capital) $Y$ cannot be greater than the random variable (capital) $X.$ But there is a region within the plane in which (lower-case) $y$ is greater than (lower-case) $x$ but less than $1,$ and $0\le x\le 1,$ and the values of $F$ within that region must be included. If you think that's a problem, then explain how one can include values of $F$ in the region where $x,y$ are both $>1$ even though the random variables $X$ and $Y$ cannot be $>1.$
Draw the graphs of the five regions and you'll see that they cover the whole plane.