That's a good question.
There are only going to be 1 out of 2 ways out of this mess.
Either both sides concede and stand down, or we are going to see one major conflict in the Middle East that makes George W Bush look like a saint.
The best case scenario is either Trump or Iran did something else to each other and declared victory and stopped, or Iran took the high road and stopped (the notion of Trump taking the high road is a joke to me) worst-case scenario is that Iran can't get over the death of Khemeni and Trump won't back down from the tantrum he was throwing, then this war keep going with Israel fanning the heat. Israel won't stop because that is a part of Nethanyahu move to cling to power (Which I said right after Oct 7 when people laughed at me, and now it's almost 3 years later and still he is in charge).
If this is not resolved, then this will just keep escalating. And I don't see any other way this war is going away, hell, I see it even when what I said becomes true, this war is still not going away. We are just putting it on the back burner for the next 2 years, 10 months.
But well, let's hope cooler heads prevail