Final answer:
The boat traveled -6 km upstream.
Step-by-step explanation:
To find the distance the boat went upstream, we need to determine the total distance traveled by the boat when it drifted past its starting point. Let's break down the problem:
First, calculate the time taken by the boat to drift back to its starting point. Since the boat traveled for 3 hours upstream and it took 3 hours for the boat to drift back, the total time taken is 3 + 3 = 6 hours.
Second, calculate the speed at which the boat was drifting downstream. Since the current was 4 km/hr and the boat was moving at the same rate as it had come upstream, the boat's speed relative to the water must have been 4 km/hr. Therefore, the total distance traveled downstream is 4 x 6 = 24 km.
Lastly, subtract the distance traveled downstream from the total distance to find the distance the boat went upstream. The total distance can be calculated by multiplying the boat's speed in still water (not including the current) by the total time (6 hours). The total distance is 3 x 6 = 18 km. Thus, the distance the boat went upstream is 18 km - 24 km = -6 km.