The arrangement has to be B-G-B-G-B-G-B
There are 4! = 24 ways to arrange the boys, and for each of these, there are 3! = 6 ways to arrange the girls. That's a total of 24*6 = 144 possible arrangements in which the boys and girls alternate.
With 7 total students, there are 7! = 5040 possible arrangements.
We're interested in 144 out of 5040, so the probability is:
[spoiler]144/5040 = 1/35[/spoiler]
Hope that helps!
Rich Zwelling
GMAT Instructor, Veritas Prep