A:
Since the questioner committed himself to the condition which is mentioned in the question, his second wife will be regarded as divorced if he takes back his previous wife in marriage. Proof for the foregoing is the Hadith in which the Prophet (peace be upon him) says,
Muslims are on (i.e. stick to) their conditions.
(Part No. 20; Page No. 172) May Allah grant us success. May peace and blessings be upon our Prophet Muhammad, his family, and Companions.