Let a side of a hexagon be equal to the height (or length) of a solid.
Solid A A = 28 cm2
I'm gonna use this formula to calculate a2 ( and b2)
2(3√3*a2/2) + 6a2 = 28 a2 = 2.5008485 a = 1.581407127
V(A) = 3√3/2 * a = 10.27502675 cm3
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Solid B A = 40.32 cm2
2(3√3*b2/2) + 6b2 = 40.32 b2 = 3.601221843 b = 1.897688553
V(B) = 3√3/2 * b = 17.75524625 cm3
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
V(B) : 6912 = V(A) : x
x = 4000 grams