Height of the wood = 15 cm

Height of the wood in water = 10 cm

Height of the wood in spirit = 12 cm

As the block of wood is of uniform cross-sectional area, the height of the block is proportional to the volume

By the principle of floatation,

{Volume\ of\ immersed\ part\over Total\ volume} = {Density\ of\ wood\over Density\ of\ sea\ water}⇒ {10\over 15} = {Density\ of\ wood \over 1}

⇒ Density of wood = {10\over 15} = 0.667 g cm^{-3}

In the case of spirit, substituting the values in the formula above, we get,

{Volume\ of\ immersed\ part\over Total\ volume} = {Density\ of\ wood\over Density\ of\ spirit}⇒ {12\over 15} = {0.667\over Density\ of\ spirit}

⇒ Density of spirit = {15\over 12} × 0.667 = 0.833 g cm^{-3}