Alright, so every 7 days(a week) in the course of those 42 days, Dave eats 4 sandwiches and 3 pizzas. 42 / 7 = 6 weeks. So every week for 6 weeks Dave ate 4 sandwiches and 3 pizzas. This is a total of:
6 * 4 = 24 sandwiches
6 * 3 = 18 pizzas
This is what he ate in the first 42 days.
Over the next 'x' days, he eats pizza 3 times for every 2 times he eats a sandwich for lunch over the course of 5 days. He's eating 1 more pizza than sandwiches during this time period. Right now he's already eaten 24 sandwiches and 18 pizzas, this is 6 more sandwiches than pizzas. So in order to eat the same amount of pizza and sandwiches, he needs to eat 6 more pizzas. In 5 days he gains 1 pizza over sandwiches. So in 6 * 5 = 30 days he should gain 6 * 1 = 6 pizzas over sandwiches and tie the number of times he had pizza or sandwiches for lunch.
Check your work:
6 * 2 = 12 more sandwiches eaten in these 30 days
6 * 3 = 18 more pizzas eaten in these 30 days
24 + 12 = 36 sandwiches eaten in total
18 + 18 = 36 pizzas eaten in total
Therefore, x = 30 days.