How to go from this formula to F distribution I have the following formula.
$$\int_{0}^{\infty} x^{\frac{n-1}{2}-1} (a+x)^{\frac{1}{2} \frac{-n}{2} -v} dx.$$
The quantities $d1 ,d2$ appearing in the pdf of the F distribution are the following.
$$d1=n-1,\ d2=2v.$$
My problem is the term $a$ (which is a constant positive hyperparameter). I want to go from $(a+x)^{\frac{1}{2} \frac{-n}{2} -v}$ to something like $(1+\frac{d1}{d2}x)^{\frac{1}{2} \frac{-n}{2} -v}.$

The basic idea is to ignore the normalizing constants.  These are factors that might depend on the parameters but don't involve the variable $x:$ they are there solely to make the density integrate to $1.$  In many questions of this sort, they appear complicated and ignoring them is a great simplification.
The pdf for the $F$ ratio distribution is a multiple of
$$x^{d_1/2-1} \left(1 + \frac{d_1}{d_2}x\right)^{-(d_1+d_2)/2}.$$
Factoring out a power of $a,$ your integrand becomes proportional to
$$x^{(n-1)/2-1} \left(1 + \frac{1}{a}x\right)^{-n/4-v}.$$
For general values of the parameters these can be equal as functions of positive $x$ only when the powers $x$ are equal and when both $d_1/d_2 = a$ and the powers of $(1 + (*)x)$ are equal (the "$(*)$" denotes the common coefficient).  Thus
$$d_1/2- 1 = (n-1)/2-1,\ \frac{d_1}{d_2} = \frac{1}{a},\, \text{and}\ (d_1+d_2)/2 = n/4 + v.$$

The first equation tells you $d_1=n-1$ and the second equation implies $d_2 = ad_1.$

We have found the parameters $(d_1,d_2):$ that's the solution. Be careful, though!  Plugging this solution into the third equation gives
$$\frac{n}{4} + v = \frac{d_1+d_2}{2} = \frac{n-1 + a(n-1)}{2} = (n-1)\frac{1+a}{2}.$$
If this doesn't hold for your values of $(n,v,a),$ then you don't have an F ratio distribution: you have something else.
