Using a white cloth is a good idea when dealing with carpet stains, as it prevents dye transfer. First, blot the stain with a clean cloth to remove excess moisture. Mix a solution of dish soap and warm water, and apply it to the stain using a clean cloth. Gently rub the area, taking care not to spread the stain. For stubborn stains, try adding a few drops of detergent or using a carpet stain remover. After treating the stain, blot with cold water to rinse and remove any residue. My years of experience have shown that this method can be quite effective in handling various types of stains on both carpet and upholstery. However, for more persistent stains, it's advisable to consult a professional with the best carpet cleaner equipment.