it was an exchange between the afghan govt and talibanNope. The 5000 in prison were ISIS and other criminals.
i think you might be referring to the prisoners that the military base that the taliban released after biden surrendered the base to the taliban.