IB 138 then UX 1517 at Madrid
Quito → Madrid → Munich
Timetable, Madrid time
17:20IB 138 from Quito at the gate
15:05UX 1517 to Munich leaves the gatealso EY 4377, MU 4956, AM 6957
21 h 45 apart on the timetable, overnight
UX 1517 leaves 21 h 45 after IB 138 arrives on the timetable: more than half a day, so not a connection we count.