For an instance, A,B,C,D,E,F represent the students, and ABC must be seated together.
Use factorial of 4 (4!). Why 4? Because we have 4 different positions. ABC together, and D, E, F who can be seated separately.
4! = 4 × 3 × 2 × 1
4! = 24
After that, multiply the result of the factorial above by 6. Why 6? Because ABC could have different order: ABC, ACB, BAC, BCA, CAB, CBA, as long as they are together. Therefore,
number of ways = 24 × 6
number of ways = 144
There are 144 ways