Niles and Bob sailed at the same time for the same length of time. Niles' sailboat traveled 15 miles at a speed of 5 mph, while Bob's motorboat traveled 42 miles at a speed of 14 mph. For how long were Niles and Bob traveling?