IB 982 then FR 6713 at Madrid
Napoli → Madrid → Budapest
Timetable, Madrid time
08:45IB 982 from Napoli at the gate
06:00FR 6713 to Budapest leaves the gate
21 h 15 apart on the timetable, overnight
FR 6713 leaves 21 h 15 after IB 982 arrives on the timetable: more than half a day, so not a connection we count.