US president offers to mediate between nuclear-armed neighbours days after his administration helps broker a ceasefire.