Aladdin and Alibaba become friends when they cross paths with each other.
Magi: The Labyrinth of Magic
Season 1 Episode 21: Meikyû Zagan
After a brief contact with the bizarre creatures living inside the Zagan Dungeon, Aladdin, Alibaba, Morgiana and Hakuryuu are greeted by Zagan himself, who holds the child who asked them for help previously as a hostage and declares that to rescue her and the other islanders trapped there, they must succeed in passing his trials. The party clears the challenges and traps Zagan throws at them with certain ease, except for Hakuryuu, whose refusal to accept assistance causes more trouble than he...