Let the price of each good mango be $p$. Then the price of each medium quality mango will be $\frac{p}{2}.$
Total cost price $ = 80p + 40(\frac{p}{2}) = 80p + 20p = 100p$
Total selling price $ = 120p\times \frac{90}{100} = 108p$
$\therefore$ Overall profit $ = \left(\frac{108p-100p}{100p}\right)\times 100\%= \left(\frac{8p}{100p}\right)\times 100\% = 8\%.$
Correct Answer $:\text{B}$