At a news conference with Israeli PM Benjamin Netanyahu, Mr Trump promised to deliver a "great" peace deal, but said both sides must compromise.
The Israelis and Palestinians have had no substantive peace talks since 2014.
In the conference, Mr Trump also asked his visitor to "hold off" on settlement building for "a little bit".
Israel has approved thousands of new homes in West Bank and East Jerusalem settlements since Mr Trump took office last month.
The Israeli government is hoping for better relations with the White House after eight years of friction with the former Obama administration.
At Wednesday's press conference, neither leader committed explicitly to back a future independent Palestine, a longstanding bedrock of US policy.
"So I'm looking at two states and one state," said Mr Trump. "And I like the one that both parties like. I'm very happy with the one that both parties like.
"I can live with either one. I thought for a while that two states looked like it may be the easier of the two.
"To be honest, if Bibi [Mr Netanyahu] and the Palestinians, if Israel and the Palestinians are happy - I'm happy with the one they like the best."
He said it would ultimately be up to the parties themselves to reach a peace agreement.
Mr Trump was also asked about his election promise to move the US embassy from Tel Aviv to Jerusalem, which could have serious implications for any peace negotiations.
"As far as the embassy moving to Jerusalem, I'd love to see that happen," Mr Trump said.
"And we're looking at it very, very strongly. We're looking at it with a great care, a great care, believe me. And we'll see what happens."
When he was asked about a two-state solution, Mr Netanyahu said he wanted to focus on "substance" and not "labels".
"There are two prerequisites for peace," said the Israeli prime minister. "First the Palestinians must recognise the Jewish state.
"Second, in any peace agreement, Israel must retain the overriding security control over the entire area west of the Jordan River."
Meanwhile the Palestinian presidency stressed its commitment to a two-state solution and an end to the Israeli occupation, Reuters news agency reported. Earlier officials had urged the White House not to abandon the concept of a Palestinian state.
The presidency said it was ready to "deal positively" with the Trump administration, and agreed with Mr Trump's call for Israel to hold off on settlement building.
It was the US and Israeli leaders' first face-to-face meeting since Mr Trump's victory in the 2016 presidential election.
A retreat from US backing for a two-state solution would upend decades of American - and international - policy embraced by Republican and Democratic administrations.
On Tuesday, a senior White House official signalled a potential policy shift by saying peace did not necessarily have to entail Palestinian statehood, and that Mr Trump would not try to "dictate" a solution.
More than 600,000 Jews live in about 140 settlements built since Israel's 1967 occupation of the West Bank and East Jerusalem - land Palestinians claim for a future state.
The settlements are considered illegal under international law, though Israel disputes this.
Photo: AFP (US President Donald Trump, right, and Israeli Prime Minister Benjamin Netanyahu hold a joint press conference at the White House).
Radio New Zealand