No, the i3 is not better than an i5. The i5 has 4 cores, whereas the i3 is 2 cores with hyperthreading.
Personally, I would not buy either, now that 7th generation Intel CPUs are released. The chips worth considering now are the Pentium G4560 and i5 7500.