Hadith.4467 - Al-'Ala' narrated from Muhammad ibn Muslim, who reported from Abu Ja'far Imam Muhammad ibn Ali Al-Baqir (as)
I asked Imam (as) about two men who married two women, but each man was mistakenly given the wife of the other.
Imam (as) said: "Each woman must observe the waiting period (iddah) from the other man, and then they may return to their rightful husbands."