I think a sufficiently unleashed Luke could take this. At this level of competition, Vader presents a slightly greater challenge than fodder; Luke can quickly attack him with emerald lightning, which the Sith Lord won't expect from a Jedi, before Palpatine can do anything. If he closes the distance and engages the duo in melee, I don't imagine Palpatine and Vader are going to fight alongside one another very efficiently. They will likely get in each other's way; in this context, Luke and Palpatine are going to be the ones fighting, with Vader barely keeping up or getting any strikes in at Luke, and probably getting cut down in an offhand follow-through. I say this because pre-vaapad Windu was basically helpless against Palpatine's speed, and Legends definitely puts ANH Vader below Windu; whether he's improved enough by RotJ to be a factor, I somehow doubt it. He's comparable to a RotJ Luke that's had ~40 years of improvement. Numbers don't necessarily mean as much as people seem to think; Luke may be able to replicate Dooku's mahanding of Obi Wan in RotS.