The rear derailleur doesn't define the required chain length. Shift the bike to big-big (large chainring and largest cog) and see if there is any slack and if you can fold the chain over itself at least 4 pins. If so the old chain should clear the newer cassette. If the chain is now the minimal length to just allow big-big with the 25, you need 2 more half links (1" additional length) to clear the 28T.