Lets say our cars are A, B, C, D, P, Q, and S.
P-Q-A-B-C-D-S
If we keep S ant the last (7th) spot, then we have 5!2 number of ways to arrange the cars, so that P and Q will be next to each other. If we take P and Q as one element then PQ-A-B-C-D could be arranged in 5! ways. Because if we replace place P with Q then we will have 5!2 number of arrangements.
P-Q-A-B-C-S-D
Keeping S in the 6th spot.
We could arrange cars to the left of S in 4!2 ways. Because, taking P and Q as one element PQ-A-B-C could be ordered in 4! ways. Changing place of P and Q will double the number of arrangements, so we will have 4!2 different arrangements of cars to the left of S. Because of the fact that we can place 4 different cars in the 7th place (which is to the right of car S) the seven cars could be arranged in 4!2*4 ways.
P-Q-A-B-S-C-D
S in the 5th spot
Cars to the left of S could be arranged in 3!2 ways. Cars to the right of S could be arranged in 4*3 ways. Therefore cars could be arranged in 3!2*4*3 ways.
P-Q-A-S-B-C-D
S in the fourth spot. We can arrange cars to the left of S in 2!2 ways. Cars to the right of S can be arranged in 3*2 ways. Therefore in this scenario we have total of 2!2*3*2 different arrangements of cars.
P-Q-S-A-B-C-D
S in the 3rd spot
Cars to the left S could be arranged in just 2 ways. Cars to the right of S could be arranged in 4*3*2 ways. Therefore total number of arrangements in this scenario is 2*4!
Therefore answer is 5!2+4!2*4+3!2*12+4!*2*2+2*4! = 720