IB 138 then CX 1923 at Madrid
Quito → Madrid → Lima
Timetable, Madrid time
17:20IB 138 from Quito at the gate
13:25CX 1923 to Lima leaves the gate
20 h 05 apart on the timetable, overnight
CX 1923 leaves 20 h 05 after IB 138 arrives on the timetable: more than half a day, so not a connection we count.