The total cost for d drinks and p popcorns can be calculated by multiplying the number of drinks by the cost per drink ($4) and adding it to the number of popcorns multiplied by the cost per popcorn ($6), like this:
Total cost = (cost per drink x number of drinks) + (cost per popcorn x number of popcorns)
Total cost = ($4 x d) + ($6 x p)
So the answer would be:
Total cost = $4d + $6p