Even if Polsko had taken south-west Masovia, Masovian dukes would not have joint Prussia. Reason? There was no Prussia at the time, it was the state of the Teutonic Order. And Masovian dukes would have gained nothing joining the Order, loosing their status as more or less independent rulers. So no way. A partition of Masovia betweem Polsko and the Order is more probable.
And then the butterflies start working. The Order State might not transform into Prussia. Polsko together with Lithuania might destroy it. Prussia might never join the Brandenburg...etc.
However, it is possible that Brandenbiurg and some successor of the Teutonic stat cut off Polsko from Baltic. Polsko ibecmoes a bigger Bohemia (prbably not a part of HRE, however). It might also expand to the east or southern east. The possibilites are many.