Don't know how much you know about carpets but..if you could see what lies below the surface you would be Shocked ! Dirt and odors gravitate to the carpet's backing. Vacuuming is basically cosmetic.If you really want to clean and preserve it, you Must use a commercial grade carpet cleaning machine. Rent one at Home Depot,,,,,well worth it ! they have the cleaning solutions there too but you might get them cheaper at another store. Make sure you use what the machine requires ! Good suck....I mean Luck !
The baking soda should be distributed in an even layer, on the carpeting and allowed to stay there for some minutes. This allows the odor to get absorbed in the baking soda, after which you'll have to vacuum the carpet.