A stream is going 3 miles an hour. A boat travels upstream 12 miles and then returns to its original position downstream along the same route. If the speed of the boat in still water is 9 miles per hour, what is the average speed for the whole trip there and back?