Let 'x' be the speed of the boat
'y' be the speed of the current
------------------------
-the boat travels 4km in 20min with the current
x + y = 4km/20min
x + y = 0.2km/min ------equation 1
-----------------------
-the boat took 24min of travel against the current
x - y = 4km/24min
x - y = 0.1667km/min ------equation 2
----------------------
Add equations 1 and 2
x + y = 0.2
+ x - y = 0.1667
2x = 0.3667
x = 0.18333 km/min
x = 183.33 m/min
---------------------
substitute x=1.08333 to equation 1
x + y = 0.2
y = 0.2 - x
y = 0.2 - 0.18333
y = 0.01667km/min
y = 16.67 m/min
--------------------
Therefore the speed of the boat is 183.33 m/min and the speed of the current is 16.67 m/min.