Rub an 80-grit sanding block over the carpet glue. Sand in the direction of the wood grain so that you avoid scratching the wood. Apply even pressure to achieve an even result. Sand until you have removed all of the carpet glue.
Sand the area with a 180-grit sanding block. This will smooth out the surface so that the paint will adhere better and will be less likely to chip and crack.
Brush off the sawdust.
Wipe the area with a damp cloth to remove the rest of the sawdust. Let the area air-dry before painting it.
Apply a thin coat of paint over the area using either a paintbrush or a paint roller. Use a paint roller if you are painting a large area or a paintbrush if it is a small area.
Paint in the same direction as the wood grain and apply even but light pressure.
Let the paint layer dry completely.
Paint another coat of paint in the same manner and let it dry completely.