Concept:"To play with fire" is a fixed idiom: to do something dangerous that could cause you harm.Solution:A fixed idiom keeps its own preposition, and this one always uses "with".So the sentence is "I told him not to play with fire", i.e. not to take a dangerous risk."On", "beneath" and "upon" do not form this idiom.Answer:Option B (with)