They phoned their travel agent who would have an emergency line. It’s a bespoke agency dealing only with school trips. They also had at least five adults present and I also expect they didn’t have to order 100 taxis at the same time.
Unfortunately resources are very thin on the railway and getting replacement transport can be very difficult. Nonetheless that doesn’t excuse the operator here; there are definitely lessons to be learned.
I'm bemused by the Manichean view, present in many of the posts here, that Avanti should have produced a complete onward travel solution for this group, and since they didn't they utterly failed. Surely a more likely scenario is something like:
Once Avanti staff know about this group, the group's leader and the senior Avanti staff member get together. They go over the various needs, restrictions, and options available. As soon as the idea of contacting the school's agents came up (and Avanti may have suggested it, based on previous experience) they agreed that was clearly the thing to try first.
If it works out, then (1) these specialists know what the school's rules and requirements are, (2) they may have access to operators that Avanti and their agents don't, and (3) they will be working in parallel with Avanti, not using their already overloaded resources. Both sides are in contact with their management up the chain, so any big bills can be signed off. No brainer, isn't it?