Final answer:
The height of the rectangular prism is 5 centimeters.
Step-by-step explanation:
To find the height of the rectangular prism, we can divide the volume by the area of the base. The base of the prism is a square with sides that are 5 centimeters long, so the area of the base is 5 cm * 5 cm = 25 cm². The volume of the prism is given as 125 cm³, so the height can be calculated as 125 cm³ / 25 cm² = 5 centimeters. Therefore, the height of the rectangular prism is 5 centimeters.