How do you do this question?

Answer:
I = 2/5 M (R₂⁵ − R₁⁵) / (R₂³ − R₁³)
Explanation:
We can look at this as the difference of two spheres, a large one and a small one. If the density is ρ, then the mass of the large sphere is:
M₂ = ρ 4/3 π R₂³
The mass of the small sphere is:
M₁ = ρ 4/3 π R₁³
The difference is:
M = M₂ − M₁
M = ρ 4/3 π R₂³ − ρ 4/3 π R₁³
M = ρ 4/3 π (R₂³ − R₁³)
Solving for ρ:
ρ = 3M / (4π (R₂³ − R₁³))
The moment of inertia of the large sphere is:
I₂ = 2/5 M₂R₂²
I₂ = 2/5 (ρ 4/3 π R₂³) R₂²
I₂ = ρ 8/15 π R₂⁵
The moment of inertia of the small sphere is:
I₁ = 2/5 M₁R₁²
I₁ = 2/5 (ρ 4/3 π R₁³) R₁²
I₁ = ρ 8/15 π R₁⁵
The difference is:
I = I₂ − I₁
I = ρ 8/15 π R₂⁵ − ρ 8/15 π R₁⁵
I = ρ 8/15 π (R₂⁵ − R₁⁵)
Substituting:
I = 3M / (4π (R₂³ − R₁³)) 8/15 π (R₂⁵ − R₁⁵)
I = 2/5 M (R₂⁵ − R₁⁵) / (R₂³ − R₁³)