The formula for density: D=m/v
D is the density. m is the mass. v is the volume.
You are given the volume of 24.0 mL and mass of 6 grams.
You plug those numbers into the formula.
D=6g/24.0mL
When you divide you should get D=0.25g/mL, therefore the density is 0.25g/mL