Both are great cameras. Since they are Interchangeable Lens Camera, so you have to compare them together with lens.
if just talking about kit, A6000 kit is cheaper than X-E2 kit, but the kit lens bundled with A6000 is lousy, different "level" in terms of IQ compared with lens bundled in X-E2 kit.
So if want to compare both with equivalent lens , I would say
A6000 (body) + Sony SEL1670Z Vario-Tessar TE 16-70mm
and X-E2 kit (18-55)
In this case, A6000 package is slightly expensive.
In the end, both are great camera. So it really depends on your budget and needs.