Density = mass / volume
Density = (45g) / (9 [volume units])
Density = 5g / [volume unit]
There was no specification on the units of volume. However, whatever it may be, just replace the square brackets with the value and your units will be correct.
8.2m questions
10.9m answers