a) Since the cost of a bag of popcorn is $6 and the cost of a drink is $4,
[tex]\begin{gathered} T=6\cdot5+7\cdot4 \\ \Rightarrow T=30+28=58 \\ \Rightarrow T=58 \end{gathered}[/tex]Therefore, the answer to the first question is $58.
b) Substitute 5 for p and 7 for d in the expression above; therefore,
[tex]T=6p+4d[/tex]The total cost is given by the equation T=6p+4d, where T is in dollars, p is the number of bags of popcorn and d is the number of drinks.