Q:

A ring is commutative if the solution of $ab=ca$ is always unique

Gallian 12.8: Show that a ring is commutative if $ab=ca \implies b=c$ when $a\neq 0$.

It's an odd statement. I tried to approach the problem by proving it directly or by contradiction, but I honestly got nowhere. Looking forward to some hint.

A:

Let $x,y\in R$, $x\neq 0$. We want to show $xy=yx$. Set $a=x$, $b=yx$, $c=xy$. Then $ab=xyx=ca$ so $b=c$ so $xy=yx$. 
For $x=0$ we clearly also have $xy=yx$ for all $y$.

