The two-state solution is one form that could potentially work. It's not the one I'd ideally like to see, but I have no skin in the game. It's a matter for Palestinians and Israelis to determine in true good faith negotiations, the kind that have never truly occurred.
What I think is both more likely and more preferable is a federated arrangement. Give Palestinians appropriate local and regional control in a new Constitution, give Palestinians reparations for lost property and land as well as crimes committed against them with appropriate interest, have a Truth and Reconciliation Commission to bring both Palestinian terrorists and Israeli war criminals to justice (erring on the side of forgiveness and reconciliation whenever possible), and see a new country emerge similar to the United Kingdom comprised of Israel and Palestine. Have that super-country have appropriate citizenship options for diasporic Jews as well as diasporic Palestinians, and have that super-country have a legislature, Prime Minister, etc. There may need to be guaranteed representation in that body, like an equal number of guaranteed slots for Palestinians and Israelis as well as the majority of proportionally elected slots, though one could also go closer to an American system and have direct elections.
Yes, it would be a complex, imperfect and evolving process. But it's been done before. Moreover, the real security issues that Israelis have are shared by the Palestinians: neither wants to see threats from ISIS or Iran, however unlikely.
I highly recommend reading Gilbert Achcar and Noam Chomsky discuss the issue, as well as this review of various federated proposals. Frankly, I think the Palestinians and Israelis have so much essentially in common in terms of their needs and interests that a two-state solution is just absurd. Moreover, even if Israel's good faith were to increase massively, it would just be staggeringly difficult for a long-term viable two-state solution to emerge: Palestine has just been too hobbled and the resources are too heavily controlled by Israel to be meaningful. A federated solution would allow for much more meaningful management of scarce resources like water, which are colossal yet hidden drivers of the conflict.