People have provided good explanations for solving this sum. I'd like to give the easiest method to solve the given question in less than 20 seconds.
Since we have been asked about "arrangement", we need to consider 2 different arrangements for each pair of students. (If we were asked about number of possible combinations, we could have used 7C2.
However, in the given question, the operative word is
Arrangement. In 90% of the cases, we use the formula for Permutations when asked about "Arrangement"
Hence, the answer will be 7P2 = 7!/(7-2)! = 7!/5! = 42.
_________________
"Success is a lousy teacher. It seduces smart people to think they can't lose" - Bill Gates.