Of course it is difficult to imagine some process to construct a sphere with so much material that was somehow stable. But you didn't say what materials made up the spheres, so it's difficult to guess at the mass. It is possible that the sun will one day eject a gaseous cloud and then clear the material from the center of that cloud so that the thickness of some shell was approximately a solar diameter. But the state is hardly stable. Gravitationally, it will collapse on itself. Or, if it is moving outward, continue to expand into space.
If a nebula is rotating or is formed from a binary star, things get way more complex.
Back to your question... It's probably trying to get you to identify this setup as the Shell Theorem. Inside a hollow sphere, there is no net gravitational force from the mass of a shell. A similar thing is true for the electrostatic field inside a conducting sphere - it is zero no matter what amount of charge is on the the sphere.
The astronomical proportions of the stated problem defy any conceivable attempt to build something at that scale. Good luck just hollowing out the moon. So it's a really unrealistic way to pose a question. However, in physics we can write equations to describe things which are not real. This question wants to show you the simplification of the Shell Theorem and how it might apply on a grand scale.