the most likely cause for swollen gum might be a food particle particularly NON-Vegetarian Stuff which might have been stucked in between teeth. Whenever any thing like this happens, gum tissue reacts in a defensive way and inflammation happens, which may produce small amount of pus, leading to foul smell.
First of all, u gently message the affected gums, and also seek if there is something still stucked in there.
if nothing is found there, this will correct within a few days after you brush the affected side twice daily, along with use of some warm saline solution or betadine
gargle. Still if it hurts, you can use an antibiotic combination of Ofloxacin
, twice a day for 3/ 5 days.
For loose teeth, there may be some periodontal problem, for which u need to take dentist's visit