First let's find the rate at which one person paint one wall. We know it takes 40 minutes for 8 people to paint 4 walls.
If we divide 40 minutes by 4 walls, we find that it takes 8 people 10 minutes to paint ONE wall. Next, we multiply 10 minutes per wall by 8 people to find how long it takes ONE person to paint ONE wall. Since it takes 8 people 10 minutes, reducing the number of people to one will increase the required time by a factor of 10. So it takes ONE person 80 minutes to paint ONE wall.
Now let's use this information to find out how long it takes 10 people to paint 7 walls. First, multiply 80 minutes by 7 since there are 7 times as much wall to paint. We now know that it takes 560 minutes for one person to paint 7 walls. Finally, divide 560 minutes by 10 people.
The answer is 56 minutes.