Ok if you have cars A B C D E F G H. Your options for the first three places are :
ABC, ABD, ABE, ABF, ABG, ABH
ACB, ACD, ACE, ACF, ACG, ACH
ADB, ADC, ADE, ADF, ADG, ADH
AEB, AEC, AED, AEF, AEG, AEH
AFB, AFC, AFD, AFE, AFG, AFH
AGB, AGC, AGD, AGE, AGF, AGH
AHB, AHC, AHD, AHE, AHF, AHG
6 x 7 = 42 options with car A in first place.
you can go through and do the same thing with each car in first place...
BAC, BAD, BAE..... HGD, HGE, HGF...
But to do it mathematically ~ 8 cars, 42 options with each car in first place.
42 x 8 = 336 different ways eight cars can finish a race in first, second and third place.