"Hekatontarchos" is a rank from the Ptolemaic army, if I recall correctly, and is equivalent to a Roman centurion (both are basically "commanders of one hundred men"). The Ptolemaic army was influenced by the Roman army as the annexation drew near.
The term "taxiarchos" is older. We encounter it already in Herodotus. It's literally a commander of a "taxis", a unit of men, sometimes translated as division or regiment. The term "taxis" was also used to refer to the entire order of battle, but taxiarchos was commander of only part of the army, often divided into "lochoi" or "companies", each numbering a few hundred men and commanded by a "lochagos" (captain). A "taxis" numbered perhaps around a thousand men, sometimes more, sometimes less.