The US president conceded the war in Ukraine was "tough to solve" after several days of high-level talks.