Randy has the better chance.
GSP's wrestling offense/defense is tried and true. Stand-up is light-years ahead of Shield's so it will look pretty similar to the Koscheck fight with more strikes thrown from GSP b/c Shield's striking is worst than Koscheck's.
Shield's only chance is to somehow get GSP down and tap him (way easier said than down).
Machida on the other-hand does not look as invincible as GSP lately. Randy needs to get close and press Machida up against the fence like he did to Vera. But Machida is better than Vera so I am pretty sure he'll tag Randy some moment throughout the fight when he's closing the distance and get a TKO.