In case of multiplication and division, the final answer cannot have more significant figures than the numbers being multiplied or divided with the least number of significant figures.
Density is the ratio of mass to the volume of a material.
In this case the mass is 50.0 g and its volume is 2.5 cm^3.
Hence density = mass/volume = 50.0/2.5 (g/cm^3) = 20 g/cm^3
Here, the volume has only 2 significant figures and hence our answer cannot contain more than that many, 2, significant figures.
Therefore the answer (density) will also have only 2 significant figures.