The boat with current travels 100 miles in 4 hr, i.e. 25 mph and against the current 80 miles in the same 4 hrs, i.e. 20 mph.
This information can now be translated into algebra.
Let B = boat speed in still water and C = current speed.
B+C = 25
B-C = 20
Add the 2 equations to get the boat spped and use this value in either of the 2 equations to get the speed of the current.