$X\sim\operatorname{Exp}(a)$ and $Y\sim\operatorname{Exp}(b)$ are independent random variables. What are $P(X>Y)$ and $P(X>2Y)$?
I know the answers are $\frac a{a+b}$ and $\frac a{a+2b}$ respectively, but I don't know how to solve this. Somebody help me thanks!

The probabilities you want to know can be calculated as the integral of the joint distribution over a specific domain: $$ \iint_D f(x,y)dydx. $$ the difficulty is to find the domain you need. For the first question, a description of this domain would be $0\le x<\infty$ and $0\le y \le x$. Note that this is not the only way to describe this domain.