The total number of grams is the sum of the amount of food Ariane feeds her cat and her dog during the day. Therefore,
(2 times k grams in the morning, 2 times k in the evening, d times one in the morning, and d times one in the evening).
Simplifying,
Therefore, the answers are
2d+4k and (2k+d)+(2k+d)