I'm not a carpet installer, but it seems to me that you could use a long blade angled back under the edge of slide to cut the old carpet, then push the edge of the new carpet under the slide butted up against the old carpet and staple it as close to the slide as possible. I don't think this would interfere with the slide operation.
Again, I'm definitely not an expert, but sometimes just common sense and careful study can solve these problems!
Good luck, happy trails, and God bless!
__________________
Joe & Annette
Sometimes I sits and thinks, sometimes I just sits.....
2002 Monaco Windsor 40PBT, 2013 Honda CRV AWD