Gather your tools: Carpet remnant, roll of double-sided carpet tape, tube of seam adhesive, putty knife, utility knife, T-square.
Instead of a utility knife, you could buy a special carpeting tool called a cookie cutter. Twist the cookie cutter back and forth to cut through the remnant and damaged carpet at the same time.