The answer is 9.
This is because if you buy 10 pencils, it will cost a total of three dollars. 0.30 times 10=3.00. You then subtract this amount by 7.50, getting 4.50. 4.50 is the total amount that was spent on pens, but since you are trying to figure out how many pens were bought, you divide 4.50 by the cost of one pen (0.50).
This gives you 9.
Hope this helps~