Which should be calculated first to solve this problem?

West's mother gave him $40 to spend at the toy store to buy presents for his cousins. West already had $20 saved from doing errands. West bought 3 toy trucks for $9.99 each and a basketball for $8.99. West had to pay 9% tax on his purchases. How much did West spend?

A.
the cost of 3 basketballs

B.
the total cost of one toy trucks and one basketball

C.
the amount of tax paid

D.
the cost of 3 toy trucks