I think a better solution is this. Though it'll never happen because it makes too much sense. The fighting between the Israelis and Palestinians won't stop because they're just like two neighbors that no matter what, will just never get along. Somebody is always going to be mad about some real or imagined slight. So the solution is a little complex, but it's workable.
The Palestinians give up any and all claims to Gaza and the West Bank.
Israel turns Jerusalem over to the UN.
Egypt cedes a few hundred square km or so of land along the border with Sudan on the Red Sea to become the new Palestinian state.
Israel pays the cost to build basic infrastructure, roads, tract housing, etc. and the cost to transport the Palestinians to this new territory.
The Palestinians sign an agreement stating that their government will forever not attack Israel or Israeli interests ever.
Israel gets: Undisputed control over Gaza and the West Bank, plus peace of mind that their neighbors won't do anything.
Palestinians get: Their own, undisputed, free and clear new territory with basic infrastructure that is far away from Israel.
Egypt gets: Rid of the problems Gaza presents, and the Palestinians are far away from anything in Egypt that could cause them problems.
Does anybody get what they want 100%? No. But everyone gets something and it is enough to make everyone at least a little bit happy and minimizes the chances of an Israeli/Palestinian conflict breaking out due to proximity.