When the rebel army broke through into the city, the former king did not run away, but chose to make a heroic final stand with his royal guards by the gates of the palace, swearing to protect the place to his last breath.
Too bad, by then it was too little too late.
He was slain, the womenfolk were taken by the victors, and only a few relatives of his house remained, scattered in distant, remote parts of the country.
In their place rose a new dynasty- headed by the nephew of that scheming concubine- his father, that powerful pasha having unfortunately died of a fever in the third year of the war.
And as a new royal family rose, like a rising tide that raises all boats, Ptolemy's family too got to ride the wave —they had contributed significantly to the war, having led a few crucial battles, and more importantly, had the foresight to curry favor with the right kind of people.
Hence they got to shoot for the moon and gain true, substantial wealth.