There is airside transfer from T5 to T2 by bus - however I am not sure if you can access this one after going through immigration at T5. It is a door to the right after clearing passport control - but I think it is one-way, or requires manual opening by staff to get you there.
Regardless it should be an easy 10 min sprint to T2, which is a very small terminal that rarely sees any queues in FT security. Assuming your flight is in time you have nothing to worry about.
You should be able to check luggage through, but as always with separate PNRs it is up to the agent in BKK whether they feel like doing it or not. If it is checked through it would get transferred to your flight automatically.