The answer is D. Calculate how many pens he bought for only the bags with 7 pens each. You get 28. Next, since you know there are 2 bags left that each must have 3 pens only, calculate how many pens he bought in only those 2 bags. You get 6. Add the 2 values. 28+6 is 34, so your answer is choice D.