Reference: Fataawa at-Talaaq – Question 121, Page 190
Question: What is the Sharee’ah ruling whereby a man wagers a bet with another man that each of them should marry within a specified period of time, and if either of them does not do so, then he must divorce his wife, and both of the men are in agreement over this [final] condition?
Response: This wager is void, and it is not obligatory upon whoever does not honour this wager to divorce his wife. However, he is required to pay a ransom, and this is the view of the majority of the scholars, who have considered the ruling of such a statement as that of taking an oath; Whereas some [others] of the people of knowledge are of the opinion that there is no ransom to be paid.