"Кому-то с кем-то не по пути." is a set phrase and is OK as a full sentence. It should be something like "they should part their ways" in all senses. Actually "не по пути" is like an adverb in phrases like "мне плохо" = "I feel bad". The implied verb is "to be".