Poor guy...Just an FYI, if she's not an adult and maybe even still under a year old, then the reason she's extremely underweight is because the prior owner wasn't feeding her live insect protein every single day. From the time they hatch up until they are a year, a year and a half old, they need a ton of live insect protein every single day, as they do most of their growing and developing during their first year of life. So while it's good that she's eating a lot of veggies and greens (the rocket and the bell peppers are both excellent choices), I'd be upping her live insects daily, maybe give her 2 separate live insect feedings every day, one in the morning (as long as her UVB tube and her Basking Bulb have been on for at least an hour or longer first), and then the second live insect feeding in the late afternoon or early evening (as long as her lights are on for at least an hour after she eats), and give her the greens/veggies in between the live insect meals. And you can Gut-Load the crickets or whatever live staple insect you feed her with the Rocket and the Peppers too. As far as fattening her up, you can try ordering some Phoenix Worms/BSFL, some dubia Roaches, or even start giving her a few occasional treat insects, like a couple of wax worms or a hornworm. Also, make sure that you are dusting the insects from one meal a day in calcium 5 times a week, and in a multivitamin 3 times a week.
As far as the URI goes, the problem is exactly what Cooper already alluded to, the vet didn't take a culture to identify what bug is causing the infection or what medication will treat it effectively, they just prescribed a broad-spectrum Antibiotic, Baytril, which doesn't treat everything that might cause a URI in a dragon. In fact, a lot of the time URI's are caused by a bacteria, a fungi, or both, and the only way to find out is by taking a culture. This is why they end up taking multiple rounds of medications, each one being more and more harsh on them. If this URI is being caused by a fungal infection, the Baytril isn't doing a thing to treat it, in fact an Antibiotic can actually make a fungal infection much worse.
I highly suggest talking to the vet about doing Nebulizer treatments instead of oral meds for the URI. I'm kind of surprised that the vet diagnosed a "Lung Infection" without doing a culture or even an x-ray, but either way if it's not getting better by the time she's done with the Baytril, then I'd definitely not do another round of Baytril (they may very likely just give her another round of it without wanting to do a culture this time either, and this is not a good treatment plan at all, and you need to put your foot down at that point if it happens). A ton of beardie owners, myself included, have had excellent luck skipping the oral meds and doing daily Nebulizer treatments with either the medication that is effective against the bug causing the URI (you'd have to have a culture done to know this information), or by just doing Nebulizer treatments with F10sc Disinfectant. I highly suggest you Google "F10 Nebulizer Treatment Bearded Dragon" and read up on it, maybe even print it out and take it in with you to the vet. It works very effectively and quickly because it gets the medication right to the source of the URI, in the lung tissue, plus it won't make his stomach upset or kill his appetite like the oral meds do.
As far as the smelly bowel movements, it might be a parasite, it might not, but either way you absolutely do not even want to consider putting her on another medication for parasites until after the URI is completely gone. He can deal with the parasites, he can't deal with the URI, and if you put him on more than one medication at a time, or one medication right after the other, the end result is usually a downward spiral where they stop eating, become very lethargic, start losing weight, etc. and it takes months and months for them to get better. The medications that they must take for moderate to high levels of common parasites (you don't want to treat low loads/counts of Coccidia or Pinworms anyway, they will resolve themselves) are all pretty harsh, and right after a full round of Baytril and then on top of whatever he'll need to take to finally get rid of the URI completely, it's just a bad, bad, bad idea...The bowel movement being normal except passing with excess fluid doesn't at all sound like parasite, it simply sounds like he's very well
hydrated. The only thing that sounds like possible parasites is the smell, but it may very likely resolve itself in a week or two anyway, I always second-guess putting them on meds for parasites, as their bodies may very well take care of the parasites without any meds if given time. So since the URI is much more pressing and needs to be taken care of ASAP, I highly suggest just letting the possible parasites go for the length of time it takes to get rid of the URI, and when that's completely gone then I'd reassess the possible parasite situation. I'd also put him on a daily dose of Probiotics while he's going through both issues, they will keep his stomach settled and keep his appetite up, they will prevent a possible secondary fungal infection in his GI Tract from the Baytril, and they may help to flush out potential parasites like pinworms, as the meds that they give for pinworms and many other parasites don't actually kill the parasites, they simply kill the eggs and make the female parasite infertile, and flush them out of their GI Tracts, and the Probiotics can also help with that process.