ok I whipped a few units but it isn't something I usually do so I'm not sure how it works? Generally when I run Slavery I occasionally see the orange arrow and read that it will take 2 population and add unhappiness for a period of time, other than these 2 factors is there something I should be aware of? Should that or these cities be focusing on food or shields to get back to a stable situation?
Ho boy, prepare to have your eyes opened.
Long version:
I sure hope you are in a mood to read.
Short version: Whenever the orange arrow appears it means that you have enough population to finish your current build by sacrificing population. If you click on it you do so. It adds 30 Hammers (Standard, scales with game speed) before modifiers per lost population point and gives you an additional unhappiness point for ten turns (Standard, also scales with game speed). It works both as quick way to gain production and as growth control tool. Since you only receive one temporary unhappiness per use of the whip, no matter if you sacrificed one, two, or six pop, it can actually increase happiness if you whip more pop at once rather than only one or two pop every few turns. Since the happy cap is low in the early game it is a popular strategy to grow cities on smaller builds to 4 or 6 pop and then whip half of it away for a bigger build, e.g. a Library or a Catapult.
Unless you have only very little food the whip is more efficient than working tiles in most cases, especially with a Granary. It only really starts getting inefficient at pop 7 and above, but in the early game you will rarely have enough good tiles to work that it would justify growing further except maybe in your capital.
I´ll give you a practical example of how I would use it in prospective Alexandria: Once it´s founded it should work the improved Wheat to grow to pop 2 while building a Granary. Then it also works either a Cottage or the Quarried Marble until the borders are close to expand, then it whips a Workboat to improve the Fish. Afterwards it continues building the Granary, ideally working the Fish, one Cottage and the Quarried Marble, with the Wheat given back to the Capital. Once it reaches pop 4 it whips the Granary with 2 pop. Then it does the same with a Harbor if you have Sailing, otherwise 3-pop whip a Library at pop 6.
Anyway, in your current situation in your capital you´ll probably want to grow from pop 3 to pop 6 repeatedly, conventionally building smaller things like Archers while it grows and then whipping something like a Library, Settler or maybe a War Chariot (I´m not sure how much they cost atm, maybe they are cheaper than I think) right before it´s about to grow to size 7. You don´t have much of a choice which tiles to work anyhow. The farmed Wheat and two Quarries are no-brainers to work, everything else is cottaged Flood Plains anyway.
Jerusalem or what-the-heck its Egyptian name is will first and foremost one-pop whip a Workboat as soon as possible since that Fish is its only good tile. After that Granary and then either Library or Ships or Barracks followed by units, whatever you think is best. Personally I´d make it a unit pump city considering it´ll flip to Arabia anyway, if it´s not captured by Persia or Rome (or Babylon
) first. Thus it´ll only really need three buildings, Granary, Harbor and Barracks, and then it can one-pop whip Archers/Axes/Spears/War Chariots from 2 to 1 for all of eternity.
As a rule of thumb, work only the best tiles in every city and whip the rest away. In fact you wouldn´t really need to whip at all in your capital once the Floodplains all have Cottages if it weren´t for that low health cap.
For the end some small tips:
Except for emergencies do not whip an item with no hammers invested, that costs extra pop.
Do not whip Wonders unless you see no other way to get it in time before someone beats you to it, they also cost extra pop.
The more food you have in relation to hammers the better is the whip. Do not or only extremely rarely use it in cities that have lots of good hammer tiles like Iron Hills or Horses and barely enough food to feed the pop working them. Conversely you´ll want to whip as often as your happiness cap allows in a city with one or two good food tiles but barely anything else. Jerusalem is a prime example of such a city.
Slavery is easily the best civic in the game for the whipping mechanism, and it only really makes sense to switch out of it in the mid-late game when improvements without resources become good enough to be worth working.