Answer: The correct answer is black because the product of its side and mass is lower.
Explanation: Density of a substance is defined as the mount of matter that can be stored in a given volume.
Mathematically,

As, density is inversely proportional to the volume of the substance.
The substance will be more denser if it has less volume and it will be less denser if the volume is more.
We are given two cubes having different sides.
Volume of the cube is calculated by using the formula:

where, a = side of the cube.
Black: The side of this cube is 2 and volume will be =
Yellow: The side of this cube is 3 and volume will be =
As, the volume of black cube is less. So, this cube will be more denser.
Density of black cube: 
Density of Yellow Cube: 
Hence, black cube will be more denser because the product of its side and mass is lower.