Ratio of the speeds of A and B = 2 : 3.
Let the speed of A=2x km/min
Hence the speed of B=3x km/min
B takes 24 minutes to cover some distance.
Hence, Distance=Time×Speed=24×3x=72x
For A,
Time=DistanceSpeed=72x2x=36
Hence, the time taken by A to cover the same distance is 36 minutes.