Density (d) is the ratio of the substance mass (m) to its volume (v).
d = m / v
Rearranging the equation gives us the equation for volume which is,
v = m / d
Substituting the values,
v = 3 g / (8.9 g/cm³)
v = 0.34 cm³
The substance occupies approximately 0.34 cm³.