Kali left school and traveled toward her friend''s house at an average speed of 40 km/h. Matt left one hour later and traveled in the opposite direction with an average speed of 50 km/h. Find the number of hours Matt needs to travel before they are 400 km apart.