Let's call the speed of the current "c". Then, the speed of the boat relative to the water when it is going upstream is 24 - c mph, and the speed of the boat relative to the water when it is going downstream is 24 + c mph.
Using the time it takes to travel the given distances, we can set up the following equation:
(54) / (24 - c) = (90) / (24 + c)
Expanding and solving for c, we find that:
c = 4 mph
So the speed of the current is 4 mph.