In this case, Earth and Mercury are both spheres. The formula for volume of sphere is 4/3(pi)(radius)(radius)(radius).
Since the volume of both is immense, it is hard to describe here.
The concept to solve this problem would be to insert the appropriate radius length hence find the difference between the two spheres.