There is no competition between the games, Pokemon X dwarves Sonic in every aspect, hands down.
There is SO much more to do in Pokemon X, ranging from multiplayer battling, completing the PokeDex, IV breeding Pokemon, and ofcourse, completing the main story.
From what I've heard, Sonic: Lost worlds is not really a good game, but that's just my opinion. It is a faced paced platformer, so some people might like it.