This is an inequality question which means it will be focused on values and it has two variables each of which are undefined, as is their relationship.
the statement from the stem is 20>= 9(n) + 3(p)
if you know this then you can start thinking of values, and a good idea is to look at higher and lower values. the greatest value of n is 2.2--- with p being very small. the greatest value of p is 6.-- with n being very small. if n = 2.2 and p is small then $40 will certanly be enough to purchase 12 of each, however if p = 6 then the pencils alone will cost $72 and $40 will not be enough.
Statement 1 says that 20>= 7n + 5p
Look at the greatest values for n and p again (keeping in mind the statements caps them at 2.2--- and 6.-- respectively) N could be 2.8-- in statement 1 but is held to 2.2--- by the original stem. p could be 3.9-- from this statement. As stated above $40 will be enough when n = 2.2-- and now check p= 3.9 to see that 12(3.9) is already over $40 - since you can get two answers this is insuficient.
Statement 2 says 20>= 4n + 8p
using the same logic - the greatest n = 2.2--- (from the stem) but the greatest p can only be 2.--- (because 8(3)>20. now check the question.
We already know that when n=2.2-- $40 will be enough, now if p = 2.--- $40 will be enough again.
Thus B is the correct answer. The key to this problem is to remember that variables in inequalities will be about picking numbers and looking at a methodical way to find those numbers will help.
Hope this helps.