I want to calculate the ratio distribution $X/Y$ of two continuous random variables $X$ and $Y$ with each having support $(0, \infty)$
I was starting like that:
$$\mathbb P\left(\frac{X}{Y}\leq z\right)=\int_{0}^\infty f_Y(y) F_{X\mid Y}(zy \mid y)dy$$
Now:
$$F_{X\mid Y}(zy \mid y)=\int_{0}^{zy} \frac{f_{X,Y}(x,y)}{f_Y(y)}dx =\frac{\frac{dF_{X,Y}(zy,y)}{dy}}{f_Y(y)}$$
and hence:
$$\mathbb P\left(\frac{X}{Y}\leq z\right)=\int_{0}^\infty \frac{dF_{X,Y}(zy,y)}{dy}dy=\left[F(zy,y)\right]_0^\infty=1,$$
which of course is not correct. Anyone can see my mistake? Thank you very much in advance
Putting together your first equation and the first equality in the second, you are esentially getting
$$ p=P( X/Y \le z)= \int_0^\infty \int_0^u f_{X,Y}(x,y) \, dx \, dy, \hspace{1cm} u=u(y)=zy \tag{1}$$
which is right, of course (there was no need to use a conditional for that, though).
Your problem in what follows is that you are mixing total derivatives with partial derivatives.
When we write (in general) the formula
$$ \frac{d F_{X,Y}(x,y)}{dy } = \int_{-\infty}^x f_{X,Y}(x',y) dx' \tag{2}$$ we are implicity assuming that the derivative is done by varying $y$ and keeping $x$ constant, i.e., it's actually a partial derivative. When the variables have some arbitrary functional dependence, we should be more careful and write that partial derivative explicitly:
$$ \frac{\partial F_{X,Y}(u,v)}{\partial v } = \int_{-\infty}^u f_{X,Y}(u',v) \, du' \tag{3}$$
In our case, plugging $(3)$ into $(1)$ we get
$$p= \int_0^\infty \frac{\partial F_{X,Y}(u,y)}{\partial y } dy \tag{4} $$
with $u=u(y)=zy $. Now, the integrand is not a total derivative, hence you cannot apply the fundamental theorem of calculus directly. The relation is
$$ \frac{d F_{X,Y}(u,y)}{d y } = \frac{\partial F_{X,Y}(u,y)}{\partial u } \frac{du}{dy}+ \frac{\partial F_{X,Y}(u,y)}{\partial y } = \frac{\partial F_{X,Y}(u,y)}{\partial u } z + \frac{\partial F_{X,Y}(u,y)}{\partial y } \tag{5}$$
You could isolate from this equation the integral in $(4)$ and replace it there... but you will get something similar (probably not simpler) than $(1)$.