As far as I know, the Gaza Strip was part of Egypt and Golan hts part of Syria until Israel occupied them. When Palestine achieves statehood, what becomes of these two areas? Do they get incorporated into the new state or become part of Egypt and Syria again?
The Gaza Strip was never annexed to Egypt; it’s part of the Occupied Territories held by Israel since the Six-Day War in 1967 and would presumably become part of a Palestinian state. (The West Bank was annexed by Jordan after the 1948 Israeli War of Independence, but was occupied by Israel in '67 during the Six-Day War; Jordan later renounced its claim to the area. East Jerusalem, unlike the rest of the West Bank, has been formally annexed by Israel.)
The Golan Heights were taken from Syria in the Six-Day War and later annexed to Israel; the dispute over the Golan is a bilateral dispute between Israel and Syria and will have to be settled separately from the Israeli-Palestinian issue.
Just to clarify: the Gaza Strip was part of the British territory of Palestine; it was under military occupation but was not annexed by Egypt between the 1948 war and the 1967 war. It was part of a somewhat larger area of eastern Palestine which would have become an Arab Palestinian state under the original U.N. partition plan for Palestine. The parts of that area of what would have been Arab territory that were not occupied by Egypt were incorporated into the new State of Israel.