I just did a game as the Mamluks last night. Its actually fairly straight forward. You have to fight them as early as possible b4 they get comfortable.
From day 1 start getting a spynetwork in Dulkadir in the North.
(this was a issue in 2 of my starts where the Ottomans took the mission to take the Levant, which gave them a claim on one of the provinces that Dulkadir has, which lead them to insta-war them b4 i can get a claim, i restarted)
Ally the Anatolian minors Karaman and Al Qoyunlu( i had A.Q. Rival Karaman and ally the Ottomans in my run and won sense the Ottomans were fighting Hungary as well but ideally both will be on your side or at least not fighting against you)
Diplo Vassalize Anizah and Medina, all you need is 190 relations(your over your diplo limit now but who cares you can afford it early game)
Rush Tech 4 Mil( you might get lucky and be the only one to have it but unlikely)
Improve relations with Hungary( He usually rivals the Ottomans and is willing to ally you and fight for land unless he picks up 2 many alliances.)
Hope to full Annex Dulkadir before the Ottomans as they have that Mountain Province in the North that Borders the Ottomans (Marash) and put a Fort there.
One i allied the Hungarians, its mainly about being patient and not rushing into the Ottoman lands right away(learned this the hard way).
Take the war goal (get that ticking war score) and wait in your lands for the Ottomans to show up with half their army, while the other is fighting the Hungarians, to try to take the WG back and then likely move on to that Fort in the Mountains that you have set up. (Keep your stacks about 1 province away from them so they feel safe about it trying to siege the Fort with half their army)
At which point, you jump on them.
If both his stacks show up, just retreat behind the fort and wait for him to fall back with ether one or both of them. He will usually try to take back the war goal at least, let him and wait for him to leave just so you can take it back again. and keep repeating this and accumulate battle wins and Ticking War Score as Hungary rips him a new one in Greece.
Then the harder part starts where you need to take one of his forts. But after beating him up a bit, it should not be 2 much of an issue.
In the peace deal, i isolated the Ottomans from the QQ lands and the like so no one tries feeding on him from the East.