Transformation and probability Let $f(x, y) = \lambda^2 \exp(−\lambda*y)$ when $0<x<y$, and $0$ otherwise.
Show that $Y$ and $\frac{X}{Y-X}$ are independent and find their distributions.
I think for $Y$, we can just take integral on $x$ to find the marginal distribution of $y$. 
However, for $\frac{X}{Y-X}$, I try to use $U= \frac{X}{Y-X}, V=Y$ to find the Jacobian matrix of $\frac{D(X,Y)}{D(U,V)}$, and apply the formula $f_U=\int f_{x,y}(\frac{UV}{1+U}, V) |\frac{D(X,Y)}{D(U,V)}| dv $ to compute the $pdf$ for $f_U$. But my solution is quite complicated and differs from the suggested solution, which says $F(2,2)$.
So is this approach correct? What is the range of $v$ when taking integral? I can only come up with the constraint $v=y>x=\frac{uv}{1+u}$...
 A: I think that the procedure you described is essentially fine.  But since $x$ and $y$ are not independent to start with, an extra step at the beginning will simplify the maths a lot.  Here is my modification of your procedure.
First, let us introduce $z = y - x$. In this way, we can integrate $x$ and $z$ from $0$ to $+\infty$, independently.  Formally, we are introducing a transformation
$$
\begin{align}
x &= x' \\
y &= x' + z,
\end{align}
$$
which has a Jacobian of $|\partial(x, y)/\partial(x', z)| = 1$. Thus,
$$
f(x', z) = f(x, y)\left|\frac{\partial(x, y)}{\partial(x', z)}\right| = \lambda \, \exp(-\lambda x') \times \lambda \exp(-\lambda z),
$$
which is a product of two normalized exponential distributions.  So $x'$ and $z$ are independent.
Next, we follow the same procedure
$$
\begin{align}
u &= \frac{x'}{z} \\
v &= x' + z,
\end{align}
$$
which gives
$$
\begin{align}
x' &= \frac{uv}{u+1}, \\
z  &= \frac{v}{u+1}
\end{align}
$$
which has the Jacobian $|\partial(x', z)/\partial(u, v)| = v/(1+u)^2$.
So
$$
f(u, v)
= f(x', z) \left|\frac{\partial(x', z)}{\partial(u, v)}\right|
= \Bigl[ \lambda^2 \exp(-\lambda v) \, v \Bigr]
\times \left[ \frac{1}{(1+u)^2} \right].
\qquad (1)
$$
The independence of $u$ and $v$ is kind of obvious now, since the probability density is a product of a function of only $u$ and that of only $v$.  But formally, we still need to compute the marginal distributions of $u$ and $v$.
Domain of integration
Alternatively, we can show that the domains of the integration of $u$ and $v$ are independent.  Note the fact that probability density is a product of a function of $u$ and a function of $v$ does not show that $U$ and $V$ are independent.  For example, in the original distribution
$$
\lambda^2 \exp(-\lambda y) = \lambda^2 \, \exp(-\lambda y) \times 1
$$
where the last $1$ can be interpreted as a function of $x$ only.  But this does not mean $x$ and $y$ are independent.  In fact they are not, because the domain of integration of $x$ is limited by $y$.  But if the domains of integration are independent, as we shall show below, then this argument holds, and $u$ and $v$ are independent.
For a fixed $v = x' + z$, we can set $x' \rightarrow 0^+$, which gives $u \rightarrow 0$, or $z \rightarrow 0^+$, which gives $u \rightarrow \infty$.  This shows the domain of integration of $u$ is $(0, \infty)$ no matter the value of $v$.
For a fixed $u = x'/z$, with $x', z > 0$,  we can simultaneously multiply $x'$ and $z$ by the same constant to reach and value of $v = x'+z$, so the domain of integration of $v$ is also $(0, \infty)$ no matter the value of $v$.
This shows that domains of integration are independent and hence the random variables $U$ and $V$ are independent.
A more “compact” solution
In the above, we introduce $x'$ and $z$, just to help us think.  It is actually not necessary.  So to go directly from $x$ and $y$ to $u$ and $v$, we have
$$
\begin{align}
u &= x/(y - x), &\qquad(2) \\
v &= y,  &\qquad(3)
\end{align}
$$
or
$$
\begin{align}
x &= \frac{uv}{u+1}, \\
y &= v,
\end{align}
$$
and $|\partial(x, y)/\partial(u, v)| = v/(u+1)^2$, we also reach (1).  But still, we need to determine the domains of integration of $u$ and $v$ from (2) and (3).  That is, for a fixed $v$ or $y$, $u$ can go from $0$ to $+\infty$, and for a fixed $u$, $v$ can also go from $0$ to $+\infty$.  These arguments are slightly easier with the introduction of $z = y - x$.
