Can't say for sure on the muffler, could be a problem because it's allowing exhaust to escape that the test equipment can't monitor. Probably depends mostly on the person doing the inspection and the rules in your area. Don't have any here, so anything I say there is a guess.
Brakes... DIY or professional? Could go as low as $15, or as much as $250 or so. If the rotors are thick enough and there's no pulsation, you could just put pads on it. I got a set of pads for a Beretta I had, cost about $15 for the cheapest ones. That was with a commercial discount and was a few years ago. Just see how much they are. Quite a bit of squeaking and squealing from the cheap pads, but all except for performance pads will stop you the same. I didn't care about noise, so I did it the cheap way. A good professional job will run a couple hours labor plus parts. Some shops do brake jobs cheaper per hour than other jobs. I can do a complete brake job on a cavalier in 30 minutes without rushing, but still get paid the full two hours (flatrate). You need to ask yourself if you want to take it to someone who is willing to sell their time for less, especially on something as important as brakes. I've seen things like twisted brake hoses (caliper installed 360* off) that made the brakes drag and ruin the pads and rotor on one side. Mistakes like that from the cheap shops is why we're in business!