Pictures would help. The gear packs are easily removed and replaced, just take the weight off them with a jack to the underside of the slide and they unbolt. Replace them one at a time and keep them in sync. Check You Tube for some videos on how to do it. You would need to find out the number of teeth on the idler gear, they come different sizes.
If you knocked teeth out of the flat gear that runs across the bottom of the slide it's a whole different and more difficult problem replacing it.