"かける" has many different meanings, but in this case, it means putting/covering/sprinkling... something on an object. So it works like "with" in this sentence.
"に" is a part of speech (a particle) which doesn't have any meaning itself.
But I feel like it has an image like an arrow?
fish and chips に vinegarをかけて食べました
fish and chips ← vinegar
the school に 行った
went to → the school
friends に 会った
met → my friends
Hmm.. I hope it'll help