Using a razor knife cut around the section of padding you are removing so you can pull it away from the rest of the padding.
Replace section of carpet pad.
Press it over the damaged area and turn until you reach the padding then pull out the circular piece and patch as you would a large section.
How to install carpet on stairs hard is it you carpet maintenance tips 3 quick fi family handyman how to install carpet like a pro easy floor remodeling how to install wall carpet yourself tos diy signs you need new carpet padding georgia finishers inc how to install wall carpet icreatables.
A line or 2 of glue on the surface of the carpet pad will often be sufficient.
Remove the old carpet pad.
In either event be prepared to vacuum up a lot of dirt and possible degraded carpet pad.
If carpet tape is not doing the job you can also use carpet glue to hold the patch in position.
If you are only replacing a 6x9 foot area with no seams i would likely just replace the carpet and pad if i could find a usable pattern on roll at lowes or home depot or a remnant at a dealer.