Greetings:
Wow you have a multi step problem, firts is the stain, the correct way to remove urine stains is to apply a commercial urine stain remover, we use a product from Pros Choice, since we clean commercial carpet only I have superior results with this product, but it is time intensive you need to steam clean the stained area first, then apply this product and let it sit for 5-8 hours, then you need to steam extract the area again. If you have any carpet cleaners in your area that use a tool called ROTO VAC, and use steam then you will have great results but they are hard to find. The object is to flush the area with alot of hot water and deep extract to complete. Alot of urine stains, much like coffee stains will leach back up when dry. To get the smell out is fairly easy, any good carpet cleaner will have spme chems called molecular modifiers, they will apply it rinse it then apply either a neutral scent or a "deep" water based scent.
Good Luck,
Joe