The correct answer is option (D):
51
Let's solve this problem using reverse reasoning, working backwards from the end.
At the end, the vendor had 25 mangoes.
Before adding 12 mangoes to Mr. B's purchase, the vendor had 25 - 12 = 13 mangoes.
These 13 mangoes represent one-fourth (1 - 3/4 = 1/4) of the mangoes remaining after Mr. A's purchase. So, before selling to Mr. B, there were 13 * 4 = 52 mangoes.
Before adding 18 mangoes to Mr. A's purchase, the vendor had 52 - 18 = 34 mangoes.
These 34 mangoes represent two-thirds (1 - 1/3 = 2/3) of the mangoes the vendor had in the beginning. Let 'x' be the initial number of mangoes. Then (2/3) * x = 34. Solving for x: x = 34 * (3/2) = 51
Therefore, the fruit vendor took 51 mangoes in his basket in the beginning.