Hopefully your son is working with a real estate professional. Assuming so, it is upon "their" advice he should rely! None of us have seen the carpet, know the price of the home relative to market conditions, or how long it's been for sale.
Unless your son purchased the home with the carpet within a fiber of its life, how bad can it be? Has he tried having it professionally cleaned? Cleaning is of course the least expensive option.
If indeed horrible, and given your price scenario ($5,000 price reduction vs. $3,500 carpet replacement) the numbers speak for themselves. Unfortunately there is no crystal ball to know what will happen next.
Depending on how much time your son has to move, "money" will soon take a back seat to urgency. What he doesn't want to do - is become desperate. To that end, he should make the best decisions he can in the moment. Hindsight is always 20/20 - but the objective is to look forward, not back.
Again, if listed, your agent's advice is the one that counts.
Wishing your son "Good Luck" for a quick sale!