If a solid X floats in liquids P of relative density 2.0 and in liquid…