If you breakdown an AR the longest piece is the barrel and upper receiver. That’s a minimum of 24” long, and more likely 26”. Either will fit in a backpack.
How did his backpack evade the metal detectors?