Palestine can't function as a nation divided, as it is, between the Gaza Strip and the West Bank, nor will Israel enjoy any peace until Palestine is one geographically united country. The solution is to for Israel to annex the Gaza Strip and move anyone who wants to leave (presumably all the muslims who live there) to a territory to the north of and contiguous with the West Bank.
This territory, I believe, should include a territory approximately 25 kilometers wide running north-northeast to a point approximately parallel to the north end of the Sea of Galilee, thence due west to the coastline north of Acre, including the disputed area of the Golan Heights, which Syria ought to be willing to cede permanently to Palestine, though they contest Israel's right to it. This would give the Palestinians far more territory than they presently occupy on the west bank and continued access to the Mediterranean.
Such a solution would raise howls of protest from both Israelis and Palestinians, both of whom would suffer severe dislocations, but it is, in my opinion, the only solution that stands a chance of permanently ending the squabbles between them that threaten to consume them both.