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

2 hours