From memory, the 'A' or 'G' options refer to the microcode ROM version in the TPU, the 'A' being for automotive and the 'G' being for motion control. If your application uses the TPU then they cannot be interchanged but they probably can if the TPU is not used.
The '25' is the rated speed of the part in Mhz. If your boards are clocked at 20MHz or less then it should be okay to use the '20' part, otherwise results and reliablity will be unpredictable. Seeing that they originally used the 25MHz part, your boards are probably clocked at 25MHz.
Good luck.
Shaun