Once you cook the instant mashed potatoes they can last in the refrigerator for up to 5 days.
Be sure to use the instant mashed potatoes within 5 days after cooking them.
You should also refrigerate the cooked instant mashed potatoes within 2 hours if you're not planning on eating them within that time because bacteria can easily and quickly start growing on the mashed potatoes when they're at room temperature longer than 2 hours.
But you can keep the cooked instant mashed potatoes up to 5 days in the refrigerator.