It is essential to pay attention to the timeline of events, to not distort the sequence and progression of events. First Hamas rejected the two-state solution. Israel has later, in effect, accepted their rejection.
Your argument is subtly biased in that you equivocating two different levels of entities: one of them is a political/militant/terrorist organisation and another is a state.
If we're dealing with the first level we should compare Hamas and Likud (+coalition); if we're dealing with the second level, we should compare Palestine and Israel. Elevating Hamas to represent the entirety of Palestine in the conflict is twisting the logic.
* - 2-state means 2 co-equal states, with equal people, and equal rights (including the equal right to be safe from the other)