IB 2299 then FR 3876 at Madrid
Melilla → Madrid → Tangier
Timetable, Madrid time
12:00IB 2299 from Melilla at the gatealso VY 5699
06:15FR 3876 to Tangier leaves the gate
18 h 15 apart on the timetable, overnight
FR 3876 leaves 18 h 15 after IB 2299 arrives on the timetable: more than half a day, so not a connection we count.