this was something called recognizing the pattern....
in my first attempt when i faced another version of same concept i went for C
but then when i understood the logic i made it a point in my flash card, which goes something like this
" in DS having two variable just find out whether they are int or not (this will either stated explicitly or implied as in this case) , typical statements will be (s1)x+y=some number and s2) Ax+by=$some value; since x and y are things such as some fruit ,items like pen book ....etc and they can not have a fractional value then just go for s2) in order to find the combintaion use s1 for limiting the values as here x+y will be 9 only and becoz x and y are int we have (1,8);(2,7);(3,6);(4,5)(5,4)(6,3)(7,2)(9,1)
using all these value in 2nd eqn you will come to know that only one set satisfy......
these are my findings
HTH