I just checked the old P&D website which is still up. Those numbers refer to the "upper sprocket".
According to their site: 5298 is the "high speed" version at 10:1 ratio
5297 is a 15:1 ratio.
I am going to guess that they put the 5298 into the 3 rail versions because lionel guys wanted them to go faster and used the 5297 in the 2 rail version.
the choice is up to you. Using the higher speed one probably lowers the torque especially at the low end but give you higher speed over all. If you have more than one and want them to run together, you might want to look at what is on the other one.
Also if yours failed, but you still have the parts, there are photos on the P&D site and you might be able to identify which you have.