Both presidents brokered deals that resulted in Hamas releasing people it took captive during the Oct. 7, 2023, attack on Israel.