Suppose a semigroup $X$ satisfies the following identities.
$$xya\equiv yxa,\quad axy \equiv ayx$$
Without assuming anything further, can we deduce that $X$ satisfies $xy \equiv yx$? In particular, we're not allowed to assume the existence of a neutral element.
Motivation. Let $X$ denote magma. Then for each $x \in X$, we get a left action $\lambda_x : X \rightarrow X$ and a right action $\rho_x : X \rightarrow X$ defined as follows.
$$\lambda_x(a) = xa,\quad \rho_x(a)=ax$$
The statement that $X$ is a semigroup can be expressed: for all $x,y \in X$ we have that $\lambda_x$ commutes with $\rho_y$. The statement that $X$ satisfies $xya\equiv yxa$ can be expressed: for all $x,y \in X$, we have that $\lambda_x$ commutes with $\lambda_y$. Similarly for the dual statement.
Thus, the semigroups satisfying the aforementioned identities are precisely the magmas in which all left and right actions commute. I am curious as to whether this implies that the law of composition is itself commutative.
Minimal counterexample: the semigroup $S$ with zero and two generators $a$ and $b$ presented by the relations $aa = bb = aba = bab = 0$. Then $S = \{a, b, ab, ba, 0\}$ and $ab \not= ba$. It satisfies the identity $xyz = 0$ and consequently the identities $xyz = yxz$ and $zxy = zyx$.