The last Egyptian pharaoh was Nectanebo II, who ruled from 358 to approximately 340 BC. Alexander founded Alexandria in 331 BC as the crown jewel of his empire where Euclid wrote his magnum opus, The Elements in 300 BC!
Unless the royal pharaoh of Egypt, refers to Ptolemy I Soter, Macedonian general who was the first Ptolemaic Kingdom ruler of Egypt after Alexander's death.