The potential of a metal sphere is directly proportional to the charge q given to it and inversely proportional to its radius r.
i.e.
Since both the spheres are conductors with the same radius and charge, the charge given to them appears on the surface evenly. Thus, the potential on the surface or within the sphere will be the same, no matter the sphere is hollow or solid.