Solution (source code)

= Solution
{c}

The <inertia tensor> about the centroid has entries $J_{ij}=\int_B\rho(r^2\delta_{ij}-x_ix_j)\,dV$. Reflection symmetry makes every off-diagonal entry zero. Under $x=a\xi$, $y=a\eta$, $z=c\zeta$, the ellipsoid becomes the unit ball. Its three coordinate second moments are equal, and
$$
\int_{\text{ball}}\xi^2\,dV=\frac13\int_{\text{ball}}r^2\,dV=\frac{4\pi}{15}.
$$
Using the stated mass gives $\int_B\rho x^2\,dV=Ma^2/5$, the same for $y$, and $\int_B\rho z^2\,dV=Mc^2/5$. Therefore
$$
\boxed{J^{(G)}=\frac M5\operatorname{diag}(a^2+c^2,\ a^2+c^2,\ 2a^2).}
$$
For the parallel coordinate axes based at $P=(0,0,c)$, the <parallel axis theorem> in tensor form is $J^{(P)}=J^{(G)}+M(|d|^2I-dd^T)$, where $d=P-G$. Thus
$$
\boxed{J^{(P)}=\frac M5\operatorname{diag}(a^2+6c^2,\ a^2+6c^2,\ 2a^2).}
$$