Once you attempt the question then PrepInsta explanation will be displayed.

They meet for the first time 16 seconds after they start the race and for the second time 40 seconds from the time they start the race.

Now, we do not know their relative positions when they start the race. But we know that the time between the first and second meeting is 24 seconds. This is the time when they cover a relative distance of one lap length.

\frac{LapLength}{RelativeSpeed}= 24

Or Relative Speed = 5 m/s

The question says – Now, if B had started in the opposite direction to the one he had originally started, they would have met for the first time after 40 seconds.

Now, B would have crossed each other after 40 seconds if B had reversed direction. This is higher than the 24 seconds it takes them to cover the relative distance of a lap in the first instance.

Or, in the first instance they were travelling towards each other.

Or, a + b = 5 m/s.

They meet for the first time 16 seconds after they start the race.

Therefore, B’s speed = 3m/s