To say Israel occupies the territories does not imply they belong to someone else; it simply means Israel has not chosen to annex them at this time.
The Partition resolution was merely a recommendation, and had no legal force behind it, so the land Israel laid claim to on May 14, 1948, was merely a claim based on the UN's recommendation. It did not include Gaza, Judea or Samaria. Several nations, including the US and USSR quickly recognized the new State of Israel, and that gave its claimed borders some international legitimacy, but during the war of independence its borders quickly expanded, and when Israel accepted the UN's invitation to join on May 11, 1949, its new borders were clearly defined and were unchanged until the Six Day War, and they did not include Gaza, Judea or Samaria; these remained unincorporated remands of the former Mandate for Palestine under Egyptian and Jordanian occupation. When Israel acquired these territories during the Six Day War, they passed from Egyptian and Jordanian occupation to Israeli occupation, but saying they are occupied does not imply they belong to anyone else; it simply means Israel has not chosen to annex them.
The real reason the Palestinians can't have a state in the terrtories is that they won't make peace with Israel, and that consideration overrides any and all quasi-legal arguments or concerns about the quality of life of the Palestinians.
List of articles and links related to the 1947 UN plan to partition Palestine into a Jewish and Arab state.
www.jewishvirtuallibrary.org