Show that a ring is commutative if it has the property that ab = ca implies b = c when $a\neq 0$ 
Show that a ring is commutative if it has the property that ab = ca implies b = c when $a\neq 0$.

This is my proof to show that a ring is commutative if it has the property that ab = ca implies b = c.
We need to show that if x, y ∈ R then xy = yx. Let a = x, b = yx and c = xy.
Then ab = x(yx) = (xy)x = ca. Thus, by the hypothesis, b = c, or xy = yx. Thus,
for x, y ∈ R we have xy = yx. 
How would I show when $a\neq 0$?
 A: I think the claim is fine and your attempt at a proof is in the right direction. If you have some ring $R$ in which $\forall a,b,c\in R (ab=ca\wedge a\neq 0)\implies b=c$, then $R$ is commutative.
Your proof works just fine, with a couple of slight modifications. First we show that if $x,y\in R$ and $x\neq 0$, $y\neq 0$ then $xy=yx$. We do this exactly the way you did. We let $a=x$, $b=yx$ and $c=xy$ then $ab=x(yx)=(xy)x=ca$ where the first and last $=$ are just using the definitions and the middle $=$ follows from associativity of multiplication. Now we can use the property since $ab=ca$ and $a\neq 0$ we get $b=c$ which means $xy=yx$.
Dealing with $x$ or $y$ equal to $0$ is easy since you get $x0=0=0x$.
The reason that the statement uses $a\neq 0$ is most probably so that you get any rings that actually satisfy the claim. Since obviously for $a=0$ if a ring were to satisfy the claim you would get that all elements must be equal.
A: The answer was very insightful. I would like to write this proof in a straightforward way.
So, we are given that this ring has the property that for any element $a,b$ and $c$ in the ring $ab=ca \implies b=c$ when $a\neq0$.
We need to prove this ring in commutative (i.e. for any $x,y$ in the ring $xy=yx$).
Two cases arise

*

*$x=0$ or $y=0$ this case trivially allows to write $xy=yx$

*Both $x$ and $y$ are non-zero: 
We can observe that $x(yx)=(xy)x$, thanks to associativity of multiplication operation of the ring.
Now, here we will use our hypothesis, take $a=x,b=yx$ and $c=xy$then, by hypothesis $b=c$ as $a(=x)\neq0$  That concludes that $yx=xy$
Since $x$ and $y$ were arbitrarily chosen the commutativity holds for every element in the ring. Hence, the ring is Commutative.
