27) A

To get the least possible cost, the discounts must be applied to the most expensive pizzas on the order.

India’s pizza costs $5,

James’ cost $8. ($6 + $2 for one topping)

Keira’s cost $6.

Lance’s cost $8.

Maddie’s cost $12. ($8 + $4 for two toppings)

Nellie’s cost $9. ($5 + $4 for two toppings)

Nellie’s cost $10. ($8 + $2 for one topping)

The two most expensive pizzas are $12 and $10. Naturally, the buy 4 get 1 free will apply to $12 pizza.
Buy 1 get 1 half price applies to $10 pizza.

So total = 5 + 8 + 6 + 8 + 9 + 5 = $41.00

So the answer is A.