Answer: To solve this problem, we can assume that both sailboats are traveling at a constant speed along the same path. Let's denote the speed of John's boat as v1 and the speed of the other boat as v2.
We know that John's boat is 30 miles from the dock initially and 50 miles from the dock after 5 hours. This means that John's boat traveled a distance of 50 - 30 = 20 miles in 5 hours. Therefore, we can calculate the speed of John's boat:
Speed of John's boat (v1) = Distance traveled / Time taken = 20 miles / 5 hours = 4 miles per hour.
Now, let's denote the distance from the dock for the other boat as d2. Since both boats are traveling along the same path, the difference in distance from the dock between the two boats will remain constant over time. In other words:
d2 - 30 = 50 - d2.
We can solve this equation to find the distance of the other boat from the dock:
2d2 = 80,
d2 = 40 miles.
Therefore, the other boat is 40 miles from the dock. Now, we can calculate the speed of the other boat using the time and distance traveled by John's boat. Since both boats started at the same time, they have been traveling for 5 hours:
Speed of the other boat (v2) = Distance traveled / Time taken = (40 miles - 30 miles) / 5 hours = 10 miles per hour.
So, John's boat is traveling at a speed of 4 miles per hour, and the other boat is traveling at a speed of 10 miles per hour.