Most RV carpet is stapled around the edges. With the room slid out and accessing it from the outside under the slide, you can most likely pull back the weather stripping and see the edge of the carpet. Screwdriver or crow bar will help to get the edge of the carpet lifted from under the slide, although you will not have much room to work with. Unless you take the slide completely out (big job, probably not something you will tackle by yourself), you will not be able to staple new stuff in the way it was done at the factory. They staple the carpet before they install the slide. I glued the edge of my new carpet down under the slide. Worked well for me.
1999 HR Navigator 42DSS
2008 Jeep Wrangler X Unlimited