If the ratio of trucks to cars is 2:5, that means that there may be 2 trucks and 5 cars, or 4 trucks and 10 cars (by multiplying both numbers by 2) or 6 trucks and 15 cars (by multiplying by 3) or . . . .
So if we know that there are 40 cars in the parking lot, we can set up two proportions equal to each other with X being the number of trucks:
2/5 = X/40
Cross multiply--> 5X = 80
Divide both sides by 5-->X = 16