The idea to solve this problem is to calculate the total volume first.
Cuboid: 9x7x3= 189
Cube: 5x5x5= 125
Total: 3 14 (cubic centimeter)
The volume of a cylinder is the bottom area multiplied by the height, and the bottom area is 5x5x3x3.14 = 25x3.14 (without calculation, because the total volume is 3 14, which can be exactly 3. 14 divisible
Then the height of the cylinder is 3 14 divided by 3. 14 divided by 25, and the answer is 4 cm.