Assume that he starts travelling to his workplace at the same time every day
Let the distance between his work place and home be 'd'
Let the actual time be 'x'
Distance = Speed * Time
Convert minutes into hours as the units should be in kmph
As 24 kmph speed resulted in 5 minutes late, it is taken as increment
d = 24(x + 5/60) ---------------(1)
As 30 kmph speed resulted in 4 minutes early, it is taken as decrement
d = 30(x - 4/60) ----------------(2)
Since distance travelled is same, d is same and hence (1) and (2) are equal
=> 24(x + 5/60) = 30(x - 4/60)
=> 24x+2 = 30x-2
=> 30x - 24x = 2+2
=> 6x = 4
=> x = 2/3
Substitute the value of x in (1)
=> d = 24(2/3 + 5/60)
=> d = 24(9/12)
=> d = 18 km
The required answer is 18 km