Depends on how many times they fought.
There is a very good chance Fedor would have lost the first time around in just the way he did. He tried to apply the same gameplan as he did with Nog: punish him on his feet, dive into the guard, shrugg off the triangle, deliver punishment. Unfortunately for him, Werdum's guard is much tighter and faster, his grip is better than Nog's. Werdum is just bigger, and stronger than Nog. Fedor couldn't shove the triangle like that, not because he 'wasn't in his prime', but because he was baited into arguably the most dangerous guard in MMA history, and certainly the most dangerous guard in HW history. Barnett analyzed the fight this way, and I agree.
With that said, I think once he modified his strategy, in a rematch, avoiding the ground like the plague, he would have outstruck and beat Werdum. For all that's said, Werdum's striking is still quite unrefined. But of course it's always possible he just gets him on the feet and finishes it from the getgo. Knowing Werdum: he will pull guard as soon as he feels danger, so I think chances are Fedor would have fallen for the trap anyway.
I think Fedor would win the majority of times, but would lose the first fight thus. I think he is a better fighter overall than Werdum, but Werdum could have capitalized on a gameplan error.