Let $V\sim \chi^2(n)$ and $W\sim \chi^2(m)$ indep. r.v.
I want to find the PDF for $X=\frac{V/n}{W/m}$.
For that I define $h(v,w)=(v,v/n\cdot m/w)=(v,x)$. So, $h^{-1}(v,x)=(v,\frac{v \cdot m}{x\cdot n})$
We know that $f_{V,X}=f_{V,W}(h^{-1}(v,x))\cdot |det(Dh^{-1}(v,x))|$.
Because they are independent, $f_{V,W}=f_{V}\cdot f_{W}$, so doing the math I get, $\displaystyle f_{V,X}=\frac{v^{(n+m)/2-1}e^{-\frac{v}{2}(1+m/(x\cdot n))}}{2^{(m+n)/2} \cdot \Gamma(n/2)\cdot \Gamma(m/2)}\cdot \frac{m}{x^2 n} \cdot \left(\frac{m}{xn}\right)^{m/2-1}$.
Now integrating with respect to $v$, we get $\displaystyle f_{X}=\frac{\Gamma((n+m)/2)}{ \Gamma(n/2)\cdot \Gamma(m/2)}\cdot \frac{1}{x} \cdot \left(\frac{m}{xn}\right)^{(m/2)}\cdot \left(1+\frac{m}{xn}\right)^{-(m+n)/2}$.
According to the book I'm using, I should have got instead: $\displaystyle f_{X}=\frac{\Gamma((n+m)/2)}{ \Gamma(n/2)\cdot \Gamma(m/2)}\cdot x^{(n-2)/2} \cdot \left(\frac{n}{m}\right)^{(m/2)}\cdot \left(1+\frac{nx}{m}\right)^{-(m+n)/2}$.
So, my question is where did I go wrong?
Any help would be appreciated.
Your computation is 100% correct. The answer provided by your book is wrong. You can see this by integrating the book's density over $x \in [0,\infty)$: it will give $(n/m)^{(m-n)/2} \ne 1$ if $m \ne n$. Feel free to refer to the Wikipedia page for the $F$-ratio distribution.