Okay, let's see if I got this.
(R^3)(density_ave)=(r^3)(density_core)+(R^3-r^3)(density_mantle)
((2.4397x10^6m)^3)(5.43x10^3kg/m^3)=(r^3)(7,800kg/m^3)+((2.4397x10^6m)^3-r^3)(2,600kg/m^3)
Which calculates to (rounded for reading's sake):
(7.89x10^22)=(7,800r^3)+(3.78x10^22)-(2,600r^3)...