He bought a total of 300 pens and pencils and spend $62.50.
Each pen cost $0.25 and each pencil cost $0.15.
Lets call x the number of pens and y the number of pencils.
Then, as the sum of x and y is 300, we can write:
[tex]x+y=300[/tex]The total cost is $62.50, which is the result of adding each individual cost: the price multiplied by the quantity.
Then, we can write:
[tex]0.25x+0.15y=62.50[/tex]We use the information of the first equation to define y in function of x and replace in the second equation:
[tex]x+y=300\longrightarrow y=300-x[/tex][tex]\begin{gathered} 0.25\cdot x+0.15\cdot(300-x)=62.50 \\ 0.25x+45-0.15x=62.50 \\ 0.10x=62.50-45 \\ 0.10x=17.5 \\ x=\frac{17.5}{0.10} \\ x=175 \end{gathered}[/tex]Knowing x, we can calculate y:
[tex]y=300-x=300-175=125[/tex]He bought 125 pencils and 175 pens.
Answer: A. 175