For qty A the count of numbers that are divisible by both 7 and 10 are those numbers between 0 and 1000 that are divisible by the LCM of 7 and 10. Since 7 is a prime number the LCM of 7 and 10 is 70. We get the count of numbers as \(\frac{980}{70}\) = 14. We take 980 because it is the last number less than or equal to 1000 which is divisible by 70. The question does not say that either 0 or 1000 or both are inclusive so in such situation take 1 of the number as inclusive and another exclusive.

For qty B use the same procedure we get the LCM of 5 and 14 as 70 because 5 is a prime number so we simply multiply the two quantities in question. As the LCM for both qty A and B is same and the limit for both the quantity is between 0 and 1000 hence for qty B as well the count of numbers is the same i.e. 14.

Therefore option C

If we had taken 0 and 1000 both inclusive the calculation would be slightly different i.e. \(\frac{980-0}{70}\) + 1

_________________

This is my response to the question and may be incorrect. Feel free to rectify any mistakes