Talaq takes place in the state of pregnancy if given. In case the words of talaq are uttered thrice, three baina mughallazah talaqs take place. In the question mentioned above, if it is proved that the husband has uttered the word of talaq three times in pregnancy then all the three talaqs took place and the wife became haram and their marital relation came to an end and there is no option for the husband to take her back. Now they cannot do their nikah without a Shariah halalah.
Allah knows Best!
Darul Uloom Deoband