The argument of periapsis is the in-plane angle between an orbit's periapsis and its ascending node.
It is correct that for an equatorial orbit with an inclination of exactly 0° (or 180°), the argument of periapsis is strictly undefined, as is the longitude of the ascending node. In these cases, however, it is convention to set the longitude of the ascending node to 0° from some reference direction (typically the vernal equinox for geocentric orbits), meaning we measure the argument of periapsis directly from the reference direction. This is called the longitude of periapsis and is used instead of the argument of periapsis.
Therefore in the given diagram, both orbits would conventionally have their respective longitude of periapsis measured from the same reference direction, allowing us to differentiate them.
This document has some great detail on understanding this, page 13 in particular.