Question 352388
There are 10 people: A(you), B(your friend) and 8 others.


You and your friend are spaced like this:

A____B or B____A = two ways


Select 3 of the Others and arrange them in the spaces. 


There are: 8P3 = 8!/5! = 336 ways.


Now we have 6 "people" to arrange: AxyzB and 5 others.


There are: 6! = 720 ways.


Therefore, there are: 2 * 336 * 720 = 483,840 line arrangements.