AA 4780 then UA 3018 at O'Hare
Buffalo → Chicago → Newark
Timetable, Chicago time
12:40AA 4780 from Buffalo at the gate
07:30UA 3018 to Newark leaves the gatealso UA 3910
18 h 50 apart on the timetable, overnight
UA 3018 leaves 18 h 50 after AA 4780 arrives on the timetable: more than half a day, so not a connection we count.