tank H (5/8 full) → 5/8 x 40 x 30 x 15 = 11250 cm³
at first tank G → 3/5 full
in the end (after water from tank H added) → 7/10 full
difference (at first and in the end) → 7/10 - 3/5 = 7/10 - 6/10 = 1/10
the difference is also the volume of water poured which is 5/8 of tank h
1/10 tank g volume → 11250 cm³
10/10 tank g volume → 11250 x 10 = 112500 cm³
height of tank G → volume ÷ base area = 112500 ÷ 5000 = 22.5 cm