Не́ с кем means no companion is available for an infinitive. Ни с ке́м means with nobody in a negative-concord clause: ни с ке́м не спорю.
RusDrills offers 300+ free interactive Russian grammar exercises with instant feedback, spaced repetition, and audio pronunciation.
Note: This site uses JavaScript for interactive drills, audio playback, and progress tracking. Please enable JavaScript for the full experience.