Let x be the speed of the motorboat and y be the speed of the current.
Then, for downstream, the speed is x + y.
Now, speed = distance/time.
Distance = 80 miles.
Time for downstream = 4 hours.
So, x + y = 80/4 = 20 (1)
Against the current, that is for upstream, the speed is x - y.
Time for upstream = 5 hours.
x - y = 80/5 = 16 (2)
Adding (1) and (2), we get,
2x = 36
x = 18
Hence, rate of the motorboat in calm water = 18 miles/hour.