Hello Niveditha28,
You need to reorganize the equation so as to have one variable on the LHS and the other on the RHS.
So, if b –a = prime, we can rewrite it as b = a + prime. This helps us understand that ‘b’ is a sum of two primes (not necessarily distinct) in such a way that b<40. So, what can the values of ‘b’ be?
37, 31, 29, 23, 19, 17, 13, 11, 7 and 5. It cannot be 2 or 3 because these two numbers cannot be the sum of two primes.
If you observe all the numbers, all of these possible values for ‘b’ are odd. This means, one of the values on the RHS should be even. There’s only one even prime number i.e. 2. So, we know one number on the RHS is definitely 2.
Of all the possible values, only 31, 19, 13, 7, and 5 can be expressed as a sum of 2 and one other prime number. Therefore, there are 5 possible cases for the other number.
Since 2 can be the “prime also, there are 10 possible cases. For example, a = 2 and b = 31; a = 29 and b = 31. So, each of the 5 cases actually yields 2 more cases in turn. Hence, 10 sets are possible.
Remember that a lot of questions on the GMAT test your knowledge of Odds and Evens; as such, a lot of questions can be boiled down to these concepts and can then be solved in a simple way.
Hope that helps!
Arvind