The source of the plant is not usually the problem. I can't tell you how many plants I have rescued from apparent death in co-worker's trash cans, LOL! They claim I have a "green thumb". Maybe, but what I do is give them a chance to survive.
A fresh pot of decent soil, a light tough watering them with aquarium water, average sunlight, and most recover. Sometimes it takes a while and you have to be patient. Plants are patient too.
And don't be afraid to tap them out of the pot. Sometimes the soil stinks (figuratively AND literally). I have sometimes just carefully washed off all the old soil and set them down in cheap pots in new potting soil and tapped around the roots until there were no air pockets around the roots.
And I suddenly have a whole new plant, thriving!