The answer is B. The solid with lower volume will have a higher density.
The way I usually think about this is by using cubes filled with cotton. You have a large rectangle and a small cube, each filled with the same amount. The cube is going to be denser because it is smaller and the cotton is more compressed to be able to fit into it. While the rectangle gives the cotton a lot of space to move freely around. Mind you, they still have the same amount of cotton, but the cube is filled with more dense cotton because it is smaller.
Another more common example is the trick question, "Which is heavier, one pound of rocks, or one pound of feathers" They are the same weight, but one is more dense than the other.