Well explained, Mesix, but:
both Alan and Gyathaar posted there's not a tie-breaker.
Thus, in the example you posted, both the teams will win, or whatever.
Anyway this is to post another couple attempts: writing before the wheel is totally useless, better is worst. Why? the capital is busy producing WBs, and the library will be delayed to max 1-2 turns, while the worker stays idle.
Remember that almost every road asks 3 turns: 1 to arrive, 2 to build, 'coz the most part of our terrain is forest, jungle or hills.
Interesting my last attempt: i built a settler before the library, and the Oracle was built in 1240 BC, with CS in the same turn. Those 3 turns of delay compared to my best attempt (1320 BC) let city 2 buid a settler after library, and city 3 is up and running in 1200 BC.
One more attempt: switching settler/library Oracle and Cs was done in 1240, but city 3 is delayed of some 5 turns.
Another one: this time i has 2 events: Mother Lode

and Herbalist - went for the mid, no success, but pop killed, 1 angry citizen, Oracle in 1160 and no academy yet.
This makes only 2 attempts failed out of total 16: 12.5% chance of fail.