Denote scalar product of vectors $v,u$ by $(v,u)$, norm of vector $v$ by $\|v\|=\sqrt{(v,v)}$.
Lemma 1. Let $A$ be a symmetric positive operator on $\mathbb{R}^n$, $f\in \mathbb{R}^n$ be a vector. Then $(Af,f)\cdot (A^{-1} f,f)\geq \|f\|^4$.
Proof. Let $A=B^2$, where $B=\sqrt{A}$ is positive. Then $(Af,f)=(B^2f,f)=(Bf,Bf)=\| Bf\|^2$, $(A^{-1}f,f)=\|B^{-1}f\|^2$ and we have to prove $\|Bf\|\cdot \|B^{-1} f\|\geq \|f\|^2$, but, by the Cauchy-Schwarz inequality, $\|Bf\|\cdot \|B^{-1} f\| \geq (Bf, B^{-1} f)=(f,f)=\|f\|^2$, as desired.
Lemma 2. If for some positive symmetric matrix $A$ diagonal elements are equal to 1, then for $A^{-1}$ diagonal elements are not less then 1.
Proof. Apply Lemma 1 to basis vectors.
Now assume that $U:=V^TSV={\rm diag}(c_1,\dots,c_n)$. Then ${\rm tr}\, V^T SV=\sum c_i$,
$$
{\rm tr}\, S={\rm tr}\, V^TS(V^T)^{-1}={\rm tr}\, V^TSV (V^T V)^{-1}={\rm tr}\, U F^{-1},
$$
where $F=V^TV$ is a symmetric positive matrix with unit diagonal elements. So, by Lemma 2 diagonal elements $w_1,\dots,w_n$ of $F^{-1}$ are not less than $1$ and so ${\rm tr}\, S=\sum c_i w_i\geq \sum c_i={\rm tr}\, U$.
As you pointed out, the integrand is invariant under the action of the orthogonal group. Thus it suffices to integrate over diagonal matrices, and multiply the result by the volume of the orthogonal group.
Suppose $X=diag(x_1,\ldots,x_k)$. Then the integral becomes
$$
\int_{\mathbb R} \prod_{i=1}^k\left(1+\frac{g}{a}x_i^2\right)^{-d/2}e^{-ax_i^2/2}\ dx_1\cdots dx_k=\left[\int_{\mathbb R}\left(1+\frac{g}{a}x^2\right)^{-d/2}e^{-ax^2/2}\ dx\right]^k.
$$
The innermost integral may be expressed in terms of moments of the Gaussian distribution.
Best Answer
The trace is invariant under cyclic permutations. This means $\text{Tr}(\mathbf{ABC}) = \text{Tr}(\mathbf{CAB}) = \text{Tr}(\mathbf{BCA})$. The terms of form $(\mathbf{x_n-\mu})^T\Sigma^{-1}(\mathbf{x_n-\mu})$ are scalars (or, if you like, $1\times1$ matrices). The trace of a scalar is just the scalar. Note also that the trace is also linear, so $\text{Tr}(\alpha\mathbf{A}+\beta\mathbf{B}) = \alpha\text{Tr}(\mathbf{A}) + \beta\text{Tr}(\mathbf{B})$, which they use right underneath where you circled. This trick is used a lot, especially when one encounters quadratic forms (i.e. $\mathbf{x}^T\mathbf{Qx}$, where $\mathbf{Q}$ is symmetric).
All they do is replace "$\text{scalar}$" with "$\text{Tr}(\text{scalar})$", and then apply the cyclic permutation property. $(\mathbf{x_n -\mu})^T\mathbf{\Sigma}^{-1}(\mathbf{x_n-\mu}) = \text{Tr}((\mathbf{x_n -\mu})^T\mathbf{\Sigma}^{-1}(\mathbf{x_n-\mu}))$ because $(\mathbf{x_n -\mu})^T\mathbf{\Sigma}^{-1}(\mathbf{x_n-\mu})$ is a just a scalar. $\text{Tr}((\mathbf{x_n -\mu})^T\mathbf{\Sigma}^{-1}(\mathbf{x_n-\mu})) = \text{Tr}(\mathbf{\Sigma}^{-1}(\mathbf{x_n-\mu})(\mathbf{x_n -\mu})^T)$ by the permutation property I mentioned.