Suppose $X{\perp\!\!\!\perp}Y, X \sim Exp(1), Y \sim U[1; 2]$. FInd $f_{X -Y|XY}(x,y)$.
It's known that it's enough to find joint density $f_{(X-Y,XY)}(x,y)$, but I'm stuck with it: trivial variable change $u = x - y, v = xy$ doesn't work, since Jacobian is zero (I've got $x = \frac{v + \sqrt{v^2 + 4u}}{2}, y = \frac{-v + \sqrt{v^2 + 4u}}{2}$). Could you help me?
When $u=x-y, v=xy$ then $y=x-u, v=x^2-xu$ .
So we may use the quadratic formula to solve for $x$ and subtract $u$ from that to solve for $y$.
Thus obtaining: $x=\tfrac12(u\pm\sqrt{u^2+4v~})$ and $y=\tfrac 12(-u\pm\sqrt{u^2+4v~})$
Now, since $u=x-y$, then the surd terms must have the same signage, and so $x+y=\pm 2\sqrt{u^2+4v~}$, allowing us to find the Jacobian determinant we need thusly:
$$\begin{align}\lVert\mathrm J\rVert~&=~\left.\begin{Vmatrix}\frac{\partial (x-y)}{\partial x} & \frac{\partial (x-y)}{\partial y}\\[1ex]\frac{\partial xy}{\partial x} & \frac{\partial xy}{\partial y}\end{Vmatrix}^{-1}~\right\vert_{\raise{3ex}{x=(u\pm\surd(u^2+4v))/2\\y=(-u\pm\surd(u^2+4v))/2}} \\[1ex] &= \left.\begin{Vmatrix}1&-1\\y&x\end{Vmatrix}^{-1}~\right\vert_{\raise{3ex}{x=(u\pm\surd(u^2+4v))/2\\y=(-u\pm\surd(u^2+4v))/2}}\\[1ex] &=\left.\dfrac 1{\lvert x+y\rvert}~\right\vert_{\raise{3ex}{x=(u\pm\surd(u^2+4v))/2\\y=(-u\pm\surd(u^2+4v))/2}}\\[1ex]&=\dfrac 1{2\sqrt{u^2+4v~}}\end{align}$$
You can now find $f_{\small X-Y,XY}(u,v)=\lVert\mathrm J\rVert\, f_{\small X}\left((u\pm\sqrt{u^2+4v~})/2\right)\,f_{\small Y}\left((-u\pm\sqrt{u^2+4v~})/2\right)$