AA 5001 then UA 5901 at O'Hare
Birmingham (Alabama) → Chicago → St Louis
Timetable, Chicago time
15:35AA 5001 from Birmingham (Alabama) at the gate
15:20UA 5901 to St Louis leaves the gate
23 h 45 apart on the timetable, overnight
UA 5901 leaves 23 h 45 after AA 5001 arrives on the timetable: more than half a day, so not a connection we count.