Solution (source code)

= Solution

The central rod occupies the holes in the discs, so the disc masses must be annular rather than counted as solid discs overlapping the rod. Define $C=L_1\rho_1=2L_2\rho_2$. Then
$$
M=\pi r_1^2L_1\rho_1+2\pi(r_2^2-r_1^2)L_2\rho_2=\pi Cr_2^2.
$$
The axial <moment of inertia> is
$$
I=\frac\pi2L_1\rho_1r_1^4+\pi L_2\rho_2(r_2^4-r_1^4)=\frac\pi2Cr_2^4.
$$
Thus \b[$I=\tfrac12Mr_2^2$], exactly the axial inertia of a uniform disc of outer radius $r_2$ and <mass> $M$. The cancellation uses the given <density>–length relation.