Calculating radius of the core with just densities

Homework Statement

Calculate the radius of the Earth's core using the following data:

Pe = 5,515 kg/m^3 (earth's average density)
Pc = 11,000 kg/m^3 (core's density)
Pm = 4,450 kg/m^3 (mantle-crust density)

Re = 6377km (radius of the earth)

Homework Equations

im guessing we should be using the gravitational equation

g = (GM)/r^2 for different shells (might be wrong)

g= gravitational acceleration
G= Gravitational constant
M = mass of sphere with radius of "r"

The Attempt at a Solution

i tried the above equation but got no where with this. i need help!!!