Yes, they will fit without no problem.
As long as they are both ddr2, which they seem to be.
But you should check your Motherboard manual, to see if the RAM you are thinking of buying, is compatible with your Motherboard.
But you would most likely get a slower performance, since the 5300 RAM is slower than the 6400.
Your RAM will not run faster than your slowest RAM, if that makes any sense.
It's better to change swap all your RAM for the PC2-8500