AA 5882 then AA 5980 at Philadelphia
Richmond → Philadelphia → Buffalo
Timetable, Philadelphia time
17:45AA 5882 from Richmond at the gate
17:10AA 5980 to Buffalo leaves the gate
23 h 25 apart on the timetable, overnight
AA 5980 leaves 23 h 25 after AA 5882 arrives on the timetable: more than half a day, so not a connection we count.