3 pizzas were plain.
Half of 18 is 9. So 9 pizzas were pepperoni.
A third of 18 is 6. So 6 pizzas had mushrooms.
9+6 = 15. 18-15 = 3.