Answer
In $59,280$ ways.
Work Step by Step
The order in which the cars finish the race matters and one car can not finish in two different positions.
Permutation of 40 distinct cars taken 3 at a time:
$_3P_{40}=\frac{40!}{(40-3)!}=\frac{40!}{37!}$
But, $40!=40\times39\times38\times(37\times36\times...\times3\times2\times1)=4\times39\times38\times37!$
$_3P_{40}=\frac{40\times39\times38\times37!}{37!}=40\times39\times38=59,280$