UA 5254 then UA 3871 at O'Hare
Rapid City → Chicago → Xiamen
Timetable, Chicago time
17:03UA 5254 from Rapid City at the gate
15:30UA 3871 to Xiamen leaves the gate
22 h 27 apart on the timetable, overnight
UA 3871 leaves 22 h 27 after UA 5254 arrives on the timetable: more than half a day, so not a connection we count.