Answer:
It is an example of a precipitation reaction. Soap contains the conjugate bases of fatty acids, and these anions (carboxylates of fatty acids) tend to form insoluble salts with magnesium and calcium cations.
Step-by-step explanation:
Usual soaps are made by a reaction called saponification, in which triglycerides (which are the main components of animal and vegetal fats and oils) react with a strong base (like KOH or NaOH), breaking the triglyceride into three fatty acid conjugate bases (carboxylates) and a molecule of glycerol.
These fatty acid conjugate bases are formed by a long saturated carbon chain and an ionised tip (i attached the structure of a generic fatty acid carboxylate). These anions form very insoluble salts with Calcium of Magnesium cations, and thus a precipitate is formed, therefore the answer is B.