Answer
$22.84\text{ g}$
Work Step by Step
We will use the formula:
$\text{Mass}=\text{Volume}\times\text{Density}$
We calculate the volume:
$\text{Volume}=2.5\text{ cm}\times 3.5\text{ cm}\times 1.5\text{ cm}=13.125\text{ cm}^3$
Then we calculate the mass, using the density of magnesium $1.74\text{ g/cm}^3$:
$\text{Mass}=13.125\text{ cm}^3\times 1.74\text{ g/cm}^3\approx 22.84\text{ g}$