LA 2485 then JA 7019 at Lima
Madrid → Lima → Cusco
Timetable, Lima time
06:35LA 2485 from Madrid at the gate
05:20JA 7019 to Cusco leaves the gate
22 h 45 apart on the timetable, overnight
JA 7019 leaves 22 h 45 after LA 2485 arrives on the timetable: more than half a day, so not a connection we count.