If the hollow one contains a gas, the gas pressure will rise as it is heated. This will cause the material of which the sphere is made to stretch. How significant this is depends on how elastic and how thick is the sphere’s material. (Think, spherical party balloon, soccer ball, steel pressure vessel).
If the hollow one contains vacuum, then both the same.
Or
Both spheres expand at an equal rate. Why? The hollow one will expand as if it were also solid. This is due to the energy increase of the molecules, leading any two molecules of the solid to move further apart. If you run you numbers through linear expansion, you'll see the diameter of the solid sphere increases just the same as the shell of the hollow sphere. Another way to think of it would be: Each molecule within an object undergoing thermal expansion needs to stretch out and expand to how it feels comfortable at that temperature, so the molecules at the surface/in the shell will stretch out just the same as the ones in the solid sphere as they would both feel comfortable in the same position, at the same temperature (since they are both the same element/object).
Read both and understand the concept.Like if satisfied