a sample of metal has a mass of 100 g and a volume of 2mL what is its density?

Density is mass divided by volume.

2 ml = 2 cm^3 , in case you forgot.

Dividing mass (in g) by volume (in cm^3) will give you density in g/cm^3, which is also called the specific gravity.