Suppose the set of students is {A,B,C,D,E,R,J}, where R is Rachel and J is Jonathan.
First calculate how many ways there are to arrange the seven "things",
{A,B,C,D,E,R,J}, whether R and J are together or not:
That is 7! or 5040
Now we must subtract from that all the ways R and J are together.
These consist of:
(A) the number of ways to arrange the 6 "things of the set {A,B,C,D,E,(RJ)},
with (RJ) considered as a SINGLE "thing", where R is on the left of J:
That is 6! or 720
(B) the number of ways to arrange the 6 "things of the set {A,B,C,D,E,(JR)},
with (JR) considered as a SINGLE "thing", where J on the left of R:
That is also 6! or 720
So the final answer is
7! - 6! - 6! = 7! - 2·6! = 5040 - 2(720) = 5040 - 1440 = 3600
Edwin