LA 9967 then JA 7029 at Lima
Quito → Lima → Cusco
Timetable, Lima time
00:14LA 9967 from Quito at the gate
19:25JA 7029 to Cusco leaves the gate
19 h 11 apart on the timetable
JA 7029 leaves 19 h 11 after LA 9967 arrives on the timetable: more than half a day, so not a connection we count.