Niles and Bob sailed at the same time for the same length of time. Niles' sailboat traveled 50 miles at a speed of 10 mph, while Bob's motorboat traveled 65 miles at a speed of 13 mph. For how long were Niles and Bob traveling?