AA 917 then JA 7029 at Lima
Miami → Lima → Cusco
Timetable, Lima time
23:25AA 917 from Miami at the gate
19:25JA 7029 to Cusco leaves the gate
20 h apart on the timetable, overnight
JA 7029 leaves 20 h after AA 917 arrives on the timetable: more than half a day, so not a connection we count.