4. There is a circular track. A runs a lap in 40 seconds, and B runs in the opposite direction to A, meeting A every 15 seconds. How many seconds does it take for B to run a lap?
【Analysis】A runs a lap in 40 seconds, and meets B every 15 seconds, which means B takes 15 seconds to run the distance A runs in $40-15=25$ seconds, so the speed ratio of A to B is $15: 25=3: 5$. Therefore, B runs a lap in $40 \div 5 \times 3=24$ seconds.