Hello!
I'm going to have to infer that you meant "grams" and not "gallons" :-)
Anyways, to find the density, you need to the divide mass over volume (d = m/V).
Since we are given the volume being 15.0 mL, and the weight being 40.5 grams, we can find the density of the aluminum block.
40.5 grams / 15.0 mL = 2.7 g/mL
Therefore, the density of the aluminum block is 2.7 grams per milliliter.