1. The arrangement scheme of four places for six candidates is A4 = 360.
The situation from a to a
From the remaining five candidate cities to the other three cities, A5 ranks 3=60.
2. The situation from B to A
Same as 1: A5 permutation 3=60.
So the answer is 360-60-60=240.
Solution b
Choose one person from four people other than Party A and Party B to go to A, and then arrange three people from the remaining three people plus five people from Party A and Party B to go to other three cities.
So there are:
C4 takes 1XA5, and the arrangement is 3=240.