Let
x ----> rate of the boat in still water (mph)
y ---> rate of the current (mph)
Remember that
The speed is equal to dividing distance by the time
speed=d/t
d=speed*time
so
Upstream
speed=x-y
time=5 hours
100=(x-y)*5
x-y=20 --------> equation 1
Downstream
speed=x+y
time=4.5 h
100=(x+y)*4.5
x+y= 100/4.5 --------> equation 2
Adds equation 1 and equation 2
x-y=20
x+y= 100/4.5
-----------------
2x=20+(100/4.5)
2x=190/4.5
x=190/9
x=21.11 mph
therefore
The answer is 21.11 mph