To solve this, we use the formula Distance = Rate × Time. First, let's find the boat's actual speed for each trip by dividing distance by time.
Going upstream (against the current), the boat travels 24 miles in 3 hours. 24 divided by 3 gives an upstream speed of 8 mph.
Going downstream (with the current), the boat travels 24 miles in 2 hours. 24 divided by 2 gives a downstream speed of 12 mph.
Let B be the boat's speed in still water, and C be the current's speed. Upstream, the current slows the boat down, so B - C = 8. Downstream, the current pushes the boat, so B + C = 12.
Add the two equations together to eliminate C: (B - C) + (B + C) = 8 + 12. This simplifies to 2B = 20, which means B = 10.
Plug B back into the second equation: 10 + C = 12, so C = 2.
The boat's speed is 10 mph, and the current's speed is 2 mph.