Answer:
5. 6 baskets
6. 4 inches
Step-by-step explanation:
Both of these questions are about the Lowest Common Multiple <em>(LCM)</em>.
5. The first thing we need to do is make the numbers so that they are split into only the prime multiples.
So,

and

Now that we've done that, the next step is to see which numbers are common in both of them. This will be the LCM of the two numbers.
so the answer 
This will have 5 sandwiches and 7 cookies in each basket.
6. Similarly here, we need to do the same thing and split them.
So,

and
.
The two multiples that are common are
, so they will be 4 inches.