The US has given Ukraine over 100 million. Some will argue the US has spent more, but this is what Ukraine has actually received.
Countries have taken loans before to pay off the costs of war (e.g. World War 2).
So it seems reasonable that a deal could be made to mine the rare earth minerals, with the proceeds being split between the two countries.
America can get its 100 billion back, while also allowing Ukraine to fund its own ongoing military operation using profits from the US mining of rare earth minerals.
Trump's desire for 500 billion seems a bit far-fetched, but a fairer number could be agreed upon. Apparently Zelensky also wants some type of security guarantee, in addition to paying back what the US has given them already. Then Ukraine could fund its own military operation and would no longer require support.
I say drag the war out, let Putin continue to attack. The attacking side can lose 4 men for every 1 of the defending side. A country can only get by on a war economy for a certain amount of time before it destroys their economy. Once their economy is wrecked, Putin will get a bullet from one of the Oligarchs.