About calculating a Green's function For a positive integer $d>=3$ and a real number $h_0$ I have the differential equation for a function $f$ of $x$,
$$x^2 h^2 f'' + \frac{6-d}{2}xh^2 f' = \frac{d(d-2)}{2}h^2f$$
where $h = h_0 x^{1- \frac{d}{2}}$. 
(..and I believe that this explicit relationship between $h$ and $x$ is not necessary to solve the question..) 
Its full Green's function is claimed as 
$$G(x,x') = \theta(x-x')\frac{2x'^{d-3}}{h_0^2(3d-4)}[(x/x')^{-d/2} - (x/x')^{d-2}  ]$$

Let me state here as I would have solved this question.  
First let me shift to variable $a$ such that $x = e^a$ and drop the overall factor of $h$ (it can never be zero) and then I have the differential equation as,
$[\frac{d^2}{da^2} + (2 - \frac{d}{2})\frac{d}{da} - \frac{d(d-2)}{2}]f(a) = 0$
So the Green's function equation that one wants to solve is,
$[\frac{d^2}{da^2} + (2 - \frac{d}{2})\frac{d}{da} - \frac{d(d-2)}{2}]G(a-a') = \delta (a-a')$
Now we use Dirac delta function convention as $\delta (a-a') = \int \frac{dk}{\sqrt{2\pi}}e^{ik.(a-a')} $ and hence the Green's function and}( its Fourier transform is defined as $G(a-a') = \int \frac{dk}{\sqrt{2\pi}} \tilde{G}(k) e^{ik(a-a')}$
And substituting the above one is solving the algebraic equation, 
$[(ik)^2 + (2 - \frac{d}{2})ik - \frac{d(d-2)}{2}]\tilde{G}(k) =  1$
hence we have, $\tilde{G}(k) = \frac{-1}{(k-\frac{id}{2})(k-i(2-d))}$
Now with the above $\tilde{G}(k)$ we want to compute the contour integral, $ \int \frac{dk}{\sqrt{2\pi}} \tilde{G}(k) e^{ik(a-a')}$
Since $d\geq3$ one of the poles is on the positive imaginary axis, $\frac{id}{2}$ and one is on the negative imaginary axis, $i(2-d)$. For $a>a'$ I need to close the contour in the upper half plane for convergence and also I need both the poles to contribute. Hence I choose to close contour as the usual semi-circle on the UHP with the flat side on the real axis but while going near the origin I take a detour around the origin to go around the $i(2-d)$ pole in the LHP. Then I take the limit of this neck width to pinch to zero. 
Then doing the usual $\sqrt{2\pi i}Residue$ analysis I get,
(after changing back to "x")
$G(x,x') = \frac{-2\sqrt{2\pi}}{3d-4}[(x/x')^{-d/2} + (x/x')^{d-2}]$


*

*But the above is not the right answer! - What can be changed in this Fourier transform based method to get the right answer? 


(the questionable thing that I am doing is to kind of deform the semi-circle contour such that it actually has to deform across the LHP pole and which is kind of tricky)  
 A: There is indeed some missing information and misprints but the correct question can be reconstructed from the quoted answer.


*

*It seems that $a$ in your equation should be replaced by $x$.

*It also seems that the question is to find the Green function corresponding to the Cauchy problem on $[0,\infty)$ for the inhomogeneous differential equation
$$x^2h^2f''+\frac{6-d}{2}xh^2f'-\frac{d(d-2)}{2}h^2f=g(x).\tag{1}$$

*In other words, one looks for solution of (1) satisfying the initial conditions $f(0)=f'(0)=0$
in the form 
$$f(x)=\int_0^{\infty} G(x,y)g(y)dy,\tag{2}$$
which means that Green function $G(x,y)$ is a solution of (1) with $g(x)=\delta(x-y)$.
The general form of the Green function for such problem is
$$G(x,y)=\begin{cases}
\frac{f_1(x)f_2(y)-f_2(x)f_1(y)}{y^2h^2_yW(f_1(y),f_2(y))},\qquad & x\geq y\\
0,\qquad & x<y,
\end{cases}\tag{3}$$
where $f_1$, $f_2$ are two linearly independent solutions of the equation (1) with $g=0$ (which can be chosen arbitrarily) and $W(f_1,f_2)=f_1'f_2-f_1f_2'$ denotes their Wronskian.
The same formula holds for any 2nd order linear ODE if we replace the expression $y^2h^2_y$ in the denominator by the appropriate coefficient of $f''$ (expressed as function of $y$!). The easiest way to prove (3) is to plug it into (2) and then verify that (1) holds and the homogeneous initial conditions are satisfied.
In your case, the linearly independent solutions can be chosen as $f_1(x)=x^{d-2}$, $f_2(x)=x^{-d/2}$, which gives $W(f_1(y),f_2(y))=\frac{3d-4}{2}y^{d/2-3}$. Now it is an easy exercise to check that (3) is equivalent to the formula for $G(x,y)$ quoted in the question.

Added: 
First of all about $h^2$. It cannot be dropped - in fact, the question of finding the Green function of homogeneous
 equation with homogeneous boundary conditions is meaningless, something should be non-zero. On the other hand, the dependence
 on this prefactor is almost trivial - if you divide by it, $f_{1,2}$ will remain the same and only $g(x)$ in (1) will change. This 
 is precisely the reason why $h_y^2=h^2(y)$ is present in the denominator of (3).
Fourier transform can in principle be used but I strongly discourage this. Firstly,
 it will work only for equations reducible to linear ODEs with constant coefficients, whereas the
 formula (3) is valid for any linear 2nd order ODE. Secondly, one should well understand what is going on in the course of solution:


*

*The solution you have written for $\tilde{G}(k)$ is not the most general one. One could add to it something like
$A\delta(k-id/2)+B\delta(k-i(2-d))$ with arbitrary $A$ and $B$. The fact that these two terms are actually absent
is related to homogeneous initial conditions.

*Concerning complex integration - namely, how should we choose the contour for integrating with respect to $k$. The contour 
should actually be located below
both poles. For $x<x'$ we can only close this contour in the lower half-plane, there are no poles inside and the
integral is zero (by the way this how $\theta(x-x')$ appears in the answer). For $x>x'$ we can only close in the upper half-plane,
so we will have the residue contribution of both poles in the Fourier transform of the Green function. 
