(i) Take a 25 cm side as the base. Area = base × height, so the height (the distance between the 25 cm sides) is
400÷25=16 cm
(ii) Now take a 20 cm side as the base. The same area gives the other height:
400÷20=20 cm
Both answers make sense: the distance between the 25 cm sides (16 cm) is less than the slanting 20 cm side, and the distance between the 20 cm sides (20 cm) is less than the slanting 25 cm side. Before it was pushed, the frame enclosed 25×20=500 sq cm; pushing it reduced both heights.