If it were one state then you'd just have the more powerful faction trying to politically dominate the agenda over the less dominant faction, which is exactly what's happening now. It solves nothing. They each need their own state to have self-determination.
Except they would have to do so democratically and not through force.
It becomes complicated because Israel gave Gaza back to the Palestinians about 15 years ago and they've used it to launch the rocket attacks from among schools and hospitals as human shields. Then because of that Israel blockades or inspects all the goods coming into Gaza looking for weapons, so Gazans cry foul.
This is false. Israel blockaded Gaza after Hamas took over, not in response to any violence directed at Israel. They've maintained that blockade since 2007.