Biden heralds ceasefire and hostage deal as Trump tries to take credit