Rule of Ptolemy IX (Soter II) & Ptolemy X (Alexander I) in Egypt
Ptolemy IX ascended the throne after the death of his father Ptolemy VIII. He got married to his sister Cleopatra IV. Soon afterwards he witnessed a struggle between his wife and his mother. This struggle was a result of underestimating the power of her son Ptolemy IX and his wife Cleopatra IV. The struggle between the two women for the throne made Cleopatra III decide to leave Egypt to Cyprus for a while.
As a result of a family relation between Egypt and Syria (The wife of the King of Syria was the sister of Cleopatra III), Ptolemy IX decided to bring Cleopatra III back to Egypt. Ptolemy IX left his wife and got married to his younger sister, Cleopatra V, which made Cleopatra IV become very jealous, and leave Egypt to Syria where she died. Cleopatra III started to arrange for getting rid of her son as a ruler through spreading rumors among people regarding his personality and policy until he had to flee to Cyprus. After his flee, she replaced him by her younger son, Ptolemy X (Alexander I). Ptolemy X ruled Egypt as a co-sovereign. At the same time, Ptolemy IX was trying to conquer some of the lands which belonged to Egypt, but at this point it was not very helpful. Cleopatra III died in 101 BC which made Ptolemy X able to rule alone.
Some scholars suggest that he had a hand in the death of his mother with a goal to take over the country. He ruled Egypt for a while until the people of Alexandria succeeded to expel him out of the country after a revolution in 88 BC. This revolution forced him to flee to Cyprus where he died. After the death of Ptolemy X, Ptolemy IX (Soter II) returned officially to the throne of Egypt, and brought Bernice III to share the throne with him as a royal concert and not a wife. Ptolemy IX didn’t want to take any part in the war taking place around the Macedonian Empire. Ptolemy IX died with no royal heir to the throne.
Bernice III found herself alone on the throne of Egypt, and there should be a way to find someone who can officially rule. She found that Ptolemy X (Alexander I) had a son who lived in Rome. This son spent his childhood in Egypt, he was years younger than Bernice III, but he married her to ascend the throne. Bernice III was a very popular figure. Unfortunately, as soon as Ptolemy XI ascended the throne, he killed her and this very action made the people of Alexandria mad at him following him to the gymnasium. At last, they killed him cutting him into pieces. He only ruled for 20 days.
You can get more information here.