What needs to happen is a genuine form of arbitration and mediation to determine the facts of ownership of the islands. The issue started back in the very early 1900's, (1901 if I'm not mistaken) when the lines of demarcation for borders was being determined during the Ottoman empire between Saudi Arabia and the Egyptian ruling party at the time (I believe it was the Khediva party). At that time, and since then, the Egyptian military has been controlling the islands because it had the ability and Saudiya did not. So the Islands were administered by Egypt and were lost in 1956 to Israel (with the help of Britain & France) but gained back after the Suez Crisis. Then lost again in 1967 up till 1982. 1982 marked the full withdrawal of Israeli troops from Sinai and relinquishing control of the 2 islands back to Egypt was part of that agreement. Consequently, Egypt re-administered military control of the islands again and that's been the case up till now.
So not only do the territorial lines of demarcation have to be resolved by an independent arbitrator or international court after reviewing all the territorial water lines of each country and how they cross over the islands and what percentage of the islands do they overlap or intersect etc., but also check the records that were made from the early 1900's and any pacts that were agreed upon and signed to between Saudiya and Egypt and then make a determination that becomes binding. These agreements are absolutely essential and could possibly override any borderline rights. The islands are in a very tight waterway and the borders are bound to overlap to some extent (because of territorial waters), but it's essential to make a valid ruling that is based on all aspects (especially agreements) of the islands' ownership by a reputable and independent party and agree to it. Basing it on anything else such as emotional or gut feeling by the people is not the way to go. Naturally, most Egyptians will say "they're ours" and vice versa with Saudis. So leaving it up to the public is not the way anything of this magnitude should be decided.