Verified Answer :

5cm×5cm×5cm=125cm^3
125cm^3×5g/cm^3=625g
The cm^3 cancel out

AL2006



Density = (mass) / (volume)

Volume of your block = (5cm x 5cm x 5cm) = 125 cm³

5 gm/cm³ = (mass) / (125 cm³)

Multiply each side by (125 cm³):  Mass = 625 gm

Note: 
I don't know what kind of frozen substance you're working with,
but maybe you ought to be careful handling it ... I know that's
not water ice you have there.  The density of water ice is not
5 gm/cm³.  In fact, it's a little less than 1 gm/cm³.  That's why
the ice floats in your soda.