Directly compute the p.d.f for $\frac{X}{Y}$ Consider two independent r.v.s $X,Y$.
A new r.v. $Z=\frac{X}{Y}$ is defined.
Probability density function $Pr(X=x)$ is $Pr(X=x) = e^{-x}$ if $x>0$,
otherwise $0$.
Probability density function $Pr(X=y)$ is $Pr(X=y) = e^{-y}$ if $x>0$,
otherwise $0$.
I calculated probability density function for $Z$ as $Pr(Z=z)=\int_{0}^{\infty}e^{-x}*e^{-x/z}dx$. This gives us $Pr(Z=z)=\frac{z}{1+z}$.
There is another method which computes the c.d.f first and then the p.d.f. which gives another p.d.f. Have attached the screenshot of the same.

 A: The first approach is incorrect, the second one is correct.
The short answer is that it is simply false that the PDF of a ratio $Z:=X/Y$ of independent (real valued) random variables $X,Y$ with PDFs $f_X,f_Y$ is $f_Z(z)=\int_{\mathbb R} f_X(x)f_Y(x/z)\mathrm dx$.
A little more explanation: one should always regard PDFs as densities of measures, i.e. differential forms. Then, if in the $x,y$-plane you have the measure $f_X(x)f_Y(y)|\mathrm dx\wedge\mathrm dy|$, in the $x,z$-plane (with $z=x/y$) that measure becomes $f_X(x)f_Y(x/z)|\mathrm dx\wedge\mathrm d(x/z)|=f_X(x)f_Y(x/z)\left|\frac{x}{z^2}\mathrm dx\wedge\mathrm dz\right|$.
You can check now that $\int_{\mathbb R}f_X(x)f_Y(x/z)\left|\frac{x}{z^2}\right|\mathrm dx$ gives the correct result, $(z+1)^{-2}$.
On the other hand, the same measure in the $y,z$-plane becomes $f_X(yz)f_Y(y)|\mathrm d(yz)\wedge \mathrm dy|=f_X(yz)f_Y(y)|y\mathrm dy\wedge\mathrm dz|$, which also gives the correct result $\int_{\mathbb R}f_X(yz)f_Y(y)|y|\mathrm d y=(z+1)^{-2}$.
