To deliever a pakcage, a messenger must travel at a speed of 60 mi/h on land and then use a motorboat whose speed is 20 mi/h in still water. The messenger goes by land to a dock and then travels on a river against a current of 4 mi/h. He reaches the destination in 4.5 hours and then returns to the starting point in 3.5 hours. How far did the messenger travel by land and how far by water?