While I can see how a Mega Hellenic state could possibly force Rome and Carthage into alliance it seems to be covered. So in response I will give an alternate empire for the city states to fight.
Perhaps a mega Achaemenid empire which curb stomps the Greeks in the Greco Persian wars and territory extends to Illyria. This huge cosmopolitan empire would make Carthage tremble, in response Carthage allies the rising imperial state of Rome in the 200s BC. This alliance would include many other little states in a coalition (Syracuse, Illyrian states, Cyrenia, etc...). This would entail a continued friendship between Rome and Carthage and the two would have more commonalities.
The war would turn well for the coalition as they wreck the Achaemenids at land and at sea (Achaemenids AKA mega paper tiger) liberating egypt, Greece and more interestingly (at least to me) Phoenician states. These states would literately be liberated with native rulers resuming rule, the coalition, however is unlikely to make it past Iraq and stops there after the Persians relent.
This world would be quite interesting with a Roman Italy, Carthaginian North Africa, Balkanized Greece and Makedonia, Phoenician and Aramaen city states, Jewish kingdom in Israel, Nabateans, a rump Achaemenid state, stronger Cyrene, Balkanized Anatolia, and native Pharonic dynasty in Egypt.
What would happen from there, I will let others speculate. After I get some feedback I will see what I can come up with after.