Given:
To Determine: The many ways the cars can be lined up
Solution
Since we have 9 cars, the first must be engine car. The number of ways of that is 1!
The last must be caboose, then the number of ways of that is 1!.
In between will be remaining 7 ways to arrange the ways. This can be done in 7! ways
Therefore, the number of ways to arrange the 9 cars would be
Hence, the number of ways the cars can be lined up is 5040 ways