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

We can use the distance formula:

distance = rate x time

Let's start with Niles' sailboat:

distance = 30 miles
rate = 5 mph
time = unknown

30 = 5t

Solving for t, we get:

t = 6 hours

Now let's do the same for Bob's motorboat:

distance = 114 miles
rate = 19 mph
time = unknown

114 = 19t

Solving for t, we get:

t = 6 hours

Since Niles and Bob traveled for the same amount of time, the answer is that they were traveling for 6 hours.