FR 3184 then FR 8394 at Barcelona
Rabat → Barcelona → Budapest
Timetable, Barcelona time
00:50FR 3184 from Rabat at the gate
18:35FR 8394 to Budapest leaves the gate
17 h 45 apart on the timetable
FR 8394 leaves 17 h 45 after FR 3184 arrives on the timetable: more than half a day, so not a connection we count.