So what's the end game for both sides here?
There's no way you're here in good faith, but for others who want to know.
Hamas wanted to secure hostages for a prisoner swap, and also wanted to interfere with relations between the Saudis and Israel. Seems like they also want to put pressure on other Arab nations to step in and help. They feel like their alliances are weakening and they wanted to disrupt Israel's influence on the rest of the ME. A two state solution is looked at as an impossibility at this point, so I'm pretty sure they just want to kill as many Israeli's as they can on their way out. Beyond resistance to the Israeli occupation their endgame is a bit unclear.
Israel wants to commit genocide on Palestinians or at least ethnically cleanse them from their land so they can continue to expand into their borders. Potentially also into Lebanon and other countries as well based on the "Greater Israel" concept being hinted at. This is being screamed by Israeli officials publicly, over and over again. They've worked for years to sabotage any chance at a two state solution. They are diving head first into a "final solution."
There's been previously unsubstantiated rumors for a while now about this, along with accusations that the IDF was firing tank shells into homes within Israel that contained Israeli hostages. I've seen people float the question "would the IDF be killing civilians indiscriminately if Hamas was hiding amongst Israelis?" and I think the answer just might be yes, they would.