Let's say the footrace's distance is 1000 meters.

The formula for speed is s = d / t. With s for speed, d for distance and t for time elapsed. If we have the speed and the distance we can calculate the elapsed time like this d / s = t.

The first contestant runs at 6 km/h for all 1000 meters.

Total time elapsed for first contestant:
1000 m / (6000 m / 60 min) = 10 min

The second contestant runs 12 km/h for the first 500 m and 3 km/h for the second 500 m.

Time elapsed for the first 500 meters: 
500 m / (12000 m / 60 min) = 2.5 min

Time elapsed for the second 500 meters: 
500 m / (3000 m / 60 min) = 10 min

Total time elapsed for the second contestant: 
10 min + 2.5 min = 12.5 min

The total time elapsed of the first contestant is lower than the total time elapsed of the second contestant. Thus the first contestant wins the footrace. In this case the the saying has a merit, since the contestant with the steady pace finished the same distance in less time.

Note:
* min stands for minutes
* h stands for hour, 1 h = 60 min
* m stands for meters
* km stands for kilometer, 1 km = 1000 m
spam fails_task lang_mismatch pii not_appropriate hate_speech sexual_content quality toxicity humor helpfulness creativity violence