Given,
Number of children with 0 pet = 10
Number of children with 1 pet = 15
Number of children with 2 pets =?
Number of children with 3 pets =?
Number of children with 4 pets =1
Number of children with 5 pets =1
Number of children with 6 pets =1
We know that,
Children with 0 pet + Children with 1 pet + Children with 2 pets + Children with 3 pets + Children with 4 pets + Children with 5 pets + Children with 6 pets = 40
10 + 15 + Children with 2 pets + Children with 3 pets + 1 + 1 + 1 = 40
Children with 2 pets + Children with 3 pets = 12
It's also given that
Children with 2 pets = 2 x Children with 3 pets
So,
By Substituting,
2 x Children with 3 pets + Children with 3 pets = 12
Children with 3 pets = 12/3 = 4
Now,
Children with 2 pets = 12 - 4 = 8