Traveling upstream the net speed of the boat is the difference of the speed of the boat and speed of the current. For downstream, the net speed is the sum of their speeds. The distance traveled by the body is the product of its speed and the time. The equation that is describe in the problem is,
(5 + c) x 2 = (5 - c) x 3
The value of c is equal to 1 mph.