The position of Holy Roman Emperor was elected and both the Kingdom of Bohemia and the Margraviate of Brandenburg which bordered Poland had a vote. A good PoD might be a 'No First Congress of Vienna' scenario - the Jagiellons keep the throne of Bohemia and are in a state of conflict with Brandenburg due to them still supporting the Ordenstaat. If the Jagiellons win the war against the Knights Teutonic (in this timeline, supported by the HRE) 1519-1521 then Poland annexes East Prussia and Brandenburg becomes a target. It would propably require an alliance with France to get a Jagiellon elected though.