Hello, my name is***** and I have over 20 years of experience as a veterinarian. I understand that you are wondering if you really need to replace your carpeting because you are getting a puppy that you will need to housebreak, and your older dog has had urine accidents on the carpet.
Dogs choose where to eliminate based upon smell and surface texture of the environment that they associate with eliminations. As young puppies they learn best by watching adult dogs, particularly their mother, and will often follow the older dog's example. They then put the cues of what they smell, feel, and observed by watching, to learn and associate where it is appropriate to eliminate.
Your home will be a new environment for the pup, so the pup may have difficulties figuring out what to do in your home. He or she will use all of their senses to try to figure out where to go. So the pup will smell, trying to find urine/stool scent, and look for a familiar texture (for example newspaper, grass, or pea gravel depending upon what they were trained on).
That means that if your carpet smells like urine accidents he/she will be attracted to it, and may have accidents there, further confusing the puppy.
You can certainly try thoroughly cleaning the carpet, but make sure to use an enzymatic cleaner to break down the scent as well as steam cleaning. Nature's Miracle is one such cleaner. But frankly if the padding and subfloor has soaked up the scent it may be very difficult to get the scent fully out. You may have much better success housebreaking the pup by simply replacing the padding and carpet. That way the pup won't start off with mixed signals.
Please let me know if you have any further questions.