Mass of ball A=12g
Mass of ball B=12g
Density of iron =8gcm3
Volume of the hollow iron ball A=15cm3
Volume of the hollow iron ball B= Mass/ density =12/8=1.5 cm−3
hollow in ball B will sink
Upthrust on ball B is 1.5gfwhich is less weight 12gf, while upthrust on ball A will be 15gf if it is fully submerged, which is greater than weight 12gf, so if will float with its submerged part for which the upthrust becomes equal to its weight which is 12gf.