HAMBURG — A day after a closely watched meeting with President Vladimir V. Putin of Russia, President Trump on Saturday said he was working with Prime Minister Theresa May of Britain on a date to visit London, after the two held what he called “tremendous talks” on trade.

Mr. Trump met with Mrs. May on the sidelines of the Group of 20 summit conference of the world’s major economic powers in Hamburg. It was the final day of the gathering, where the differences between the United States and the other 19 nations on trade and climate change have been on vivid display, and protesters set fire to cars and looted in the streets of the German city the night before.

“Nothing’s easy,” Mr. Trump said of the gathering on Saturday as he complimented its host, Chancellor Angela Merkel of Germany, who has been toiling to bridge the gap between the United States and other nations, for handling the challenge “so professionally.”

One prominent example was on climate change, where Ms. Merkel succeeded on Saturday in brokering compromise language between the United States — which Mr. Trump has withdrawn from the Paris accord to reduce global carbon emissions — and the other 19 nations that will declare in the G-20 communiqué that the agreement is “irreversible.”