Final answer:
After setting up equations based on the given costs and totals, it was determined that each pencil costs $1 and each pen costs $1.50 when Mary spent a total of $40 for 10 pencils and 20 pens.
Step-by-step explanation:
To solve the problem of how much each pencil and each pen costs based on the information that a pen costs $0.50 more than a pencil and the total spent for 10 pencils and 20 pens is $40, we need to set up two equations to represent this situation
Let's assume the cost of a pencil is x dollars. Therefore, the cost of a pen would be x + $0.50. If Mary buys 10 pencils, she spends 10x dollars on pencils. For the 20 pens, she spends 20(x + $0.50). The total amount spent on pencils and pens is expressed as:
10x + 20(x + $0.50) = $40
Solving this equation, we get:
10x + 20x + $10 = $40
30x + $10 = $40
30x = $30
x = $1
So, each pencil costs $1 and each pen costs $1 + $0.50 = $1.50.