I dont think petco is allowed to sell tadpoles, unless they have a permit. Anyway you were doing everything right, he probably just picked up a parasite from the store. You could try to treat them with fish medications for internal parasites next time, just to be sure. I have never had a tadpole get sick or waste away, and I dont exactly keep them in ideal conditions. They live in a five gallon tank with playsand and some duckweed. They have an air pump, but no filter. I feed them boiled lettuce and turnip greens once a week. I have five large bullfrog tadpoles in there and at least two ghost shrimp. It used to be a brackish tank, so they can handle some salt in their water.
Good Luck!