AA 9909 then UA 5787 at Denver
Los Angeles → Denver → Rapid City
Timetable, Denver time
16:45AA 9909 from Los Angeles at the gate
15:45UA 5787 to Rapid City leaves the gate
23 h apart on the timetable, overnight
UA 5787 leaves 23 h after AA 9909 arrives on the timetable: more than half a day, so not a connection we count.