
I approached the problem as following:
$f_{Z}(z) = \int_{0}^{\infty} f_{X,Y}(X=\frac{z}{y},Y=y)dy$
However, according to the textbook, the problem should be solved as below:
$f_{Z}(z) = \int_{0}^{\infty} f_{X}(X=\frac{z}{y}) f_{Y}(Y=y) dy$
Why do we use the marginal pdfs multiplied, instead of the joint pdf? They are equivalent when $X$ & $Y$ are independent, but when they are not doesn't it make more sense to use the joint distribution of $X$ & $Y$ in the integral, since that would account for any dependence?
I am looking to understand this conceptually. Any insights would be appreciated!
We should not (hence either your book is wrong or you took a formula valid in the discrete setting for a formula valid in the continuous setting).
In full generality, if $Z=XY$, then $$ f_Z(z)=\int f_{X,Y}(y^{-1}z,y)y^{-1}\mathrm dy. $$ In your case, $$ f_Z(z)=\int_0^\infty y^{-2}z\mathrm e^{-z-z/y}\mathrm dy\,\mathbf 1_{z\gt0}=\left[\mathrm e^{-z-z/y}\,\mathbf 1_{z\gt0}\right]_{y=0}^{y=+\infty}=\mathrm e^{-z}\mathbf 1_{z\gt0}. $$