Take a tape measure and determine approximately how much carpet you will need. This will be only an approximation, because RVs are seldom perfectly square or rectangular, such as rooms in your home.
Remove the current carpeting. Pull it up gently; this is going to be the pattern for your new carpet, so try not to destroy it.
Preserve the tack track, if possible. If your carpet is currently held down by tack track, which is a small piece of wood with tacks protruding upward, then try to keep that in one piece. If it is not in good shape or the tacks are rusted, then don't worry about it. If you don't have any tack track, don't worry about that, either. Some RVs have it, some don't.
Place the old carpet on top of the new carpet and cut around the edges.
Install the new carpet into the RV. Smooth out any wrinkles and make sure it is tight. If you have tack track, stretch the new carpet between the tacks, and use a small hammer to gently tap it into place. If you don't have tack track, use a medium-duty staple gun to staple the carpet as close to the edges as possible.