x = cups of tea per hour
y = cups of coffee per hour
David makes 30 cups of tea per hour = 30x
David works for D hours this week.
Therefore number of weekly cups of tea = number of hours * cups of tea per hour
This is 30x * D = 30Dx
For Andrew, it is similar
30Ay
Because Andrew made an additional 10 cups, then it is 30Ay + 10
(cups of coffee this week)