You're making this situation unnecessarily difficult. It's a 20' wide by 10' high hallway. If the caster aims his fireball at the ceiling it will go over the heads of his friends and thread between a few troll heads, none of which will logically create an opening smaller than an arrow slit...