Rocky ate 42 cups of dog food. Since there are 7 days in a week, 21 cups were eaten per week (3x7). Since the question is asking for the amount in two weeks, you multiply 21x2 to get 42.
Rocky ate 3 cups of dog food each day for two weeks, there's 7 days in a week, if you multiply 14 ( number of days in 2 weeks) and 3( the number of dog food each day) you would get 42 because 7 days are in 1 weeks and if you add another 7 days, you would get 14 days and by multiplying that by 3, the dog food Rocky ate each day, you would get 42, the answer to your question. Hope this answers your question!