Bolko II wouldn't inherit Poland. Since 1355 IIRC Louis of Hungary was Casimir's heir in case the former had no (legitimate) sons.
Instead of Casimir III dying earlier it'd be better to have him die later - i.e. 1382. Considering that Casimir died because of infection from hunting incident and that his father lived to the age of 72, it's quite possible. Also, just before his death Casimir was preparing for war against Luxemburgs. In this war he'd most likely have the support of Wittlebachs and Hungarians. End result: Silesia to Poland, Brandenburg to Wittlebachs nad (maybe) moravia to Hungary.
Now butterflies - with 12 yrs more to live Casimir had a chance of getting a (legitimate) son - so continued Piast dynasty on the throne of Poland. Which means no union with Lithuania, but alliance with it aginst Teutonic Order is likely. But Lithuania ITTL would still be fought over by Jogailla and Vytautas, which would weaken it; although Jogailla may end up marrying a Muscovian princess.
Another thing - with continued Piast dynasty in Poland, Pomerania remains Polish-aligned.
In the end in case of conflict between Teutonic Order and Poland, sides may be:
1. Poland, Pomerania and Jogailla's Lithuania
2. Teutonic Order and Vytautas-aligned Lithuanians
Side effect of Pomerania being on Polish side would be a lower number of Western European knights on Order's side, as they would be able to get to Order's territory only by sea - Pomerania cutting of the land road.
Further change - in case of Polish coalition victory Order loses for sure Eastern Pomerania with Gdańsk as well as Chełmno Land and possibly Elbing and other close cities. With Piast on the throne of Poland there'll be no wishy-washing of 1410-1 OTL. All in all, possible earlier end of Teutonic Order in Prussia, compared to OTL.