They are both weighed down by plate mail, with Jaime actually potentially being slower and having less stamina due to the strength disadvantage. He might see the hammer coming, but getting out the way is another story, especially when he gets tired.
Furthermore, a longsword actually kinda sucks for fighting a guy in full plate and really isn't a great battlefield weapon at all. For example, a good spearman is gonna beat an equally skilled swordsman 9/10 times. Longswords were prominent because you were permitted to wear them in town. Conversely, you couldn't just roll into town with your halberd and flail. You had to check that stuff in with your innkeep/city guard. As a result, swords were popular for unarmored dueling. That's also why we see so many medieval and renaissance sword manuals geared towards dueling. But if you are actually out on the field, and fully armored, you might wanna pick up a spear or a mace instead. Hell...I've seen demonstrations with longswords where the thrust didn't even make in through chain mail.
A warhammer, OTOH, is well-suited for killing a guy in plate because you don't need to thrust or slash through the armor to actually do damage.
So what are Jaime's options?
Fight on the outside? None of his slashes will make it through Robert's Armor and given that he's being dragged down by plate, it's not like he can stick and move like a boxer. With both sides wearing full plate and Robert being stronger, speed becomes a wash. Also, Robert's hammer is longer.
Parry the swings and thrusts of the hammer? The moment of inertia of a 10 pound warhammer is too much to be successfully parried by a 3 pound longsword. It's like trying to deflect a cannon ball with tissue paper.
Commit to a thrust? It might penetrate the plate (it might not), but Robert has proven capable of delivering a killing afterblow. It also brings Jaime into a range where Robert can just wrestle him to the ground and pummel him to death. To even get a good thrust, he is probably gonna need to employ half-sword techniques, which further reduce his range.
So basically for Jaime to win this fight, he needs to thrust in all these weird places like under the armpit, behind the knee....all while being within Robert's killzone. There's even a chance his sword breaks in the process. He also needs to never get hit.
For Robert to win this fight, he needs to hit Jaime one time. He has the advantage in tech, strength, stamina, range. Jaime loses his speed advantage when the armor goes on. Being a good swordsman doesn't really take you very far in a fight between two heavily armored opponents. Maybe if Jaime was using an Estoc instead of a longsword, it would bring him back into the fight, but he is using a weapon that is just not suited for the job.