A) 324
I divided 240 by 20 to get how much it would cost per kg. For each KG the cost is $12. So then I multiplied 12 by what was asked of you (27) which lead me to the answer of 324.
B) 512
Same concept as A. Divide to get how much gasoline is used per mile. That was 4 miles per 1 gas. Multiply 4 by whatever you have been asked for (128). That leads you to 512.
C) 648
Same concept as above.
D) 5,445