Answer
$\color{blue}{T^2=\dfrac{8a^3}{d^2}}$
Work Step by Step
RECALL:
(1) If $y$ varies directly as $x$, then $y=kx$ where $k$ is the constant of proportionality.
(2) If $y$ varies inversely as $x$, then $y=\dfrac{k}{x}$ where $k$ is the constant of proportionality.
Notice that when the variation is direct, the variable is on the numerator while if the variation is inverse, the variable is in the denominator.
$T^2$ varies directly with the cube of $a$ and inversely with the square of $d$. Thus, the equation of the variation is:
$T^2=k\cdot \dfrac{a^3}{d^2}$
Since $T=2$ when $a=2$ and $d=4$, then substituting these into the tentative equation above gives:
$\require{cancel}
T^2=k \cdot \frac{a^3}{d^2}
\\2^2=k \cdot \frac{2^3}{4^2}
\\4=k \cdot \frac{8}{16}
\\4=k \cdot \frac{1}{2}
\\2 \cdot 4=k \cdot \frac{1}{2} \cdot 2
\\8=k$
Thus, the equation of the inverse variation is:
$T^2=8\cdot \dfrac{a^3}{d^2}
\\\color{blue}{T^2=\dfrac{8a^3}{d^2}}$