Hat and River Problem Below is the story problem:

A person dives from a bridge into a river and swims upstream through the water for 1 hour at constant speed. She then turns around and swims downstream through the water at the same rate of speed.
As the swimmer passes under the bridge, a bystander tells the swimmer that her hat fell into the river when she originally dove. The swimmer continues downstream at the same rate of speed, catching up with the hat at another bridge exactly 1 mile downstream from the first one. What is the speed of the current in miles per hour?

The answer given was 1/2 mile per hour and the author concluded it took 2 hours - "The whole thing took 2 hours, during which the hat traveled
1 mile downstream."
How did he come to the conclusion that it took 2 hours for the "whole thing"?
 A: Give the provided information, we can't know the speed of the swimmer, but let's suppose the swimmer swims at a speed of $v$ miles per hour. That is, if the water would not flow, she swims at $v$ miles per hour. Since the hat flows with the water, that means that as the swimmer swims upstream, the distance between the hat and the swimmer increases at exactly that $v$ miles per hour. So, swimming back, the swimmer decreases the distance with exactly $v$ miles per hour as well. So, if she swam upstream for one hour, it'll take that one hour to catch back up.
The key to solving this puzzle is therefore to look at the movement of the swimmer relative to the river as a 'whole'. That is, if we look at the movement of the swimmer relative to all of space, the swimmer goes through space at an enormous speed, since the swimmer is located n planet Earth, which hurtles through space at a good clip ... and our solar system moves at great speed relative to the center of our galaxy, etc. etc.  So thinking about these kinds of things, we recognize that 'speed' is always relative to something. Now, here on Earth, and for day to day purposes, most of the time we think of and measure speed relative to the 'surface' of the Earth. Indeed, that's is exactly the perspective you are asked to take when asked the speed of the river: that's relative to the river bank, or bridge, or river bed, or anything that's in a 'fixed' position as far as the earth surface goes.
OK, but for solving this puzzle, it is better to take think about the movement of the hat and swimmer relative to the river as a whole. That is, we can think of the river as a kind of 'snake' that moves, as a whole, relative to the Earth's surface. However, how does the hat and swimmer move relative to this 'snake'?  Well, relative to the river, the hat remains at a fixed position; it's as if it is 'attached' to the snake.  The swimmer, however, moves with a certain speed relative to this river; think of it as 'crawling' along the skin of the snake. And we can assume that is the same relative speed as if the swimmer is in standing water, i.e. in a lake or pool. And, when the swimmer turns around, the swimmer moves at exactly that same speed relative to the river again, just in the opposite direction. So, thinking about it that way, it really is analogous to the situation where she would dive in a lake, lose the hat right where she dove in, swim for an hour into the lake, and then turns around: how long does it take to get back to the hat? An hour of course!
A: *

*$s$ - speed of swimmer, positive

*$r$ - speed of river, positive

*$p_1$ - position the swimmer goes upstream, positive

*$p_2$ - position the swimmer goes downstream, positive

*$t$ - the time it takes to go from $p_1$ to $p_2$



A person dives from a bridge into a river and swims upstream through the water for 1 hour at constant speed.

$$p_1 = (s - r)\cdot 1$$

As the swimmer passes under the bridge, a bystander tells the swimmer that her hat fell into the river when she originally dove.

$$p_2 = r\cdot (t + 1)$$

The swimmer continues downstream at the same rate of speed, catching up with the hat at another bridge 

$$p_1 + p_2 = (s + r) \cdot t$$

exactly 1 mile downstream from the first one.

$$p_2 = 1$$

$$(s - r)\cdot 1 + r\cdot (t + 1) = (s + r)\cdot t$$
$$s - r + r\cdot t + r = s\cdot t + r \cdot t$$
$$s = s\cdot t$$
$$s = 0 \text{ or } t = 1$$
Since "catching up with the hat" wouldn't make sense if $s=0$, it must be that $t=1$.
$$p_2 = r\cdot(t+1)$$
$$1 = r\cdot(1+1)$$
$$\frac12 = r$$
A: Work in the frame of reference of the hat (i.e., the surface of the river).  The swimmer swims away from the hat for one hour and then swims toward the hat until she gets back to it--which clearly also takes one hour. 
