The problem is that these two statements are in grave conflict with each other in a straightforward reading.
Gaza is occupied by Hamas, which is extremely hostile to a two-state solution. Israel is trying--probably failing, and at far too high a human cost--to eliminate Hamas.
In the 18 years that Hamas has had control of Gaza, it has prevented any challenge to its power, using as much brutality as necessary (like murdering political adversaries).
Much of the problem with your analysis is that you seem to be measuring equivalence in deaths. Hamas kills a thousand Israelis; okay, proportionate response is for Israel to kill a thousand Palestinians. But it's not! Collective punishment isn't accepted as a moral stance these days.
Israel and Hamas both claim that if Hamas is not eradicated, Hamas will kill over and over again. Hamas officials have said so, and anyway, they've done it over and over in the past (but never to this scale). Furthermore, Israel and Hamas both agree that Hamas will do anything it can to make Israel kill Palestinian civilians if Israel is going to get at Hamas. (Hamas lauds them as martyrs; Israel decries the strategy as using human shields.)
Removing Hamas seems necessary. What will mere "stopping" accomplish other than allowing Hamas to dig in again, be a threat again, murder political opponents again, prevent peace again?
However, where Israel errs most is in haste. Getting rid of Hamas is difficult. Doing so without killing a horrifying number of Palestinians is even more difficult. You have to plan for an unprecedented operation in order to succeed--for instance, internally relocating the entire population of Gaza multiple times, sending them through a security cordon, dismantling infrastructure that supports terror, identifying and apprehending Hamas operatives, etc. etc.. I'm not sure Israel could manage the logistics on its own, and who else would help?
But surely it could have taken a calmer, grimmer, more patient approach, which also would help reduce the hot fury that leads to a greater number of atrocities in the field.