When chloromethane reacts with potassium cyanide, it will produce methyl cyanide (A) and potassium chloride. It is a nucleophilic substitution reaction in which cyanide ion will displace chloride ion. On further step, methyl cyanide gets hydrolysed and give acetic acid (B).