I would be very grateful if you give me a hint on it:
Suppose $R$ is a finite commutative ring with identity such that $ x^3 = x $ for all elements $x$ of $R$. Then $R$ is a finite direct product of fields of order $2$ or $3$.
Should I try to incorporate Artin-Wedderburn?
Thanks!
I'd like to point out that the commutativity assumption can be removed. A theorem of Jacobson says that any ring with unit satisfying $a^{n(a)}=a$, with $n(a)>1$ an integer depending on $a$, is commutative. This is part of a large collection of ring theory results assuring commutativity, and can be found in Herstein's book Noncommutative Rings.
Indeed, the first step of the proof shows that $R$ is semisimple by considering $a(1-a^{a(n)-1})=0$. Thus we can apply Artin-Wedderburn to write $R$ as a sum of matrices over division rings. Commutativity implies the matrices are all $1\times 1$, so $R$ is a sum of division rings. Commutativity, or finiteness and an overpowered use of Wedderburn's theorem, implies the division rings are fields. The orders of the fields are then restricted by the specific relation $x^3=x$, as desired.
Indeed, we don't have to invoke Jacobson. We have semisimple by the same argument, Artin-Wedderburn applies, and $a^{n(a)}=a$ means we have no nilpotent elements. Any $n\times n$ matrix ring has nilpotents if $n>1$, so $R$ is a sum of division rings. By finiteness, Wedderburn's theorem applies to conclude the division rings are fields (whence $R$ is commutative).