Okay, so first off, the thought that a Pachycephalosaurus could comfortably move in a place like Freddy Fazbear's Pizzeria is utter BS, considering it supposedly stood at about 10 feet tall and was about 18 feet long. So, actually, considering the fact that this dino would be restricted due to its size, this actually helps Freddy quite a bit. And even if it was like a juvenile dino, I do think Freddy could have a good handle on it, partly due to his 20-30 years worth of experience around the restaurant, he knows every corner, and since he's known as one of the most intelligent animatronics in FNAF1, he could slip into the dark corners of the restaurant and strike from the shadows.
Now, granted, this will not be an easy fight for Freddy to win, since one of his main methods of attack, biting someone on the head, really doesn't work considering its extra thick skull. However, considering the fact that Freddy does have a huge intelligence edge over the Pachycephalosaurus as well as the home-field advantage, I'll give this fight to Freddy with high difficulty.
Winner: Freddy Fazbear.