If you have damaged carpet enough that you need to replace a piece of it, you can easily do it, and for relatively inexpensively too. Here are the supplies you need, all available at a carpet store. You will also need a piece of matching carpet. If you don’t have any left over, get some from an inconspicious place, such as a closet or in a corner underneath the curtains.
Circular carpet cutter (large enough to cut out the entire stained area)
double-sided carpet tape
First, use the cutter to cut a hole over the stain or damage. Be careful not to cut the underlay beneath it. Pull out the damaged piece. Cut a clean piece of carpet the same size. Now cut a piece of carpet tape the same size as the hole and stick it to the underlay. Then use the sealer glue on the edge of the carpet, then push the new piece of carpet into place. Push it securely into place, and avoid walking on the area while the sealer dries.