Although the Fantastic Beasts and Where to Find Them franchise takes place several decades before Harry Potter’s years at Hogwarts, the two stories are more intertwined than they appear. Forget Dumbledore being the crossover character that connects them, it looks like Newt Scamander himself might have handled Buckbeak during Harry’s fateful third year.
A closer look at the Marauder’s Map from Prisoner of Azkaban shows Newt Scamander’s name making an appearance. Recall that the map shows the exact location of everyone who is currently on Hogwarts grounds, even if they’re trying to conceal themselves. It doesn’t matter if they’re an Animagus like Sirius Black and Peter Pettigrew or under the effects of Polyjuice Potion like Barty Crouch. So long as a person is not in the Room of Requirement, they’ll show up.
Because Newt appears to be in his thirties in 1926 and Harry Potter is set in the 1990s, he’d be a very old man in Harry’s third year. But this checks out if we recall that Wizards have longer life spans than Muggles — Dumbledore died at age 115. Newt’s presence at Hogwarts has three main possibilities, then. The first is that might have secretly been at Hogwarts to monitor Lupin as a precaution, considering the fact that he’s the first Werewolf faculty member.
The second is that he might have been visiting Lupin as a friend or mentor, since Lupin himself had an affinity for magical creatures.
But the third and most likely option is that he was quietly handling Buckbeak. Because even in the wildly incompetent Ministry, Macnair couldn’t have been the only person in charge of magical beasts.