According to Electro-chemical series the metal with more -ve potential will replace the metals below it in series in their salts and tend to oxidize.
A) not occurs since Mg more reactive than Ni (with -ve potential)
B) potential of Al is more -ve than iron so it can replace it in its salt and the reaction can occur spontaneously so B is the correct answer.
C) Mercury cannot replace Al
D) Zinc cannot also replace potassium