Great algebra word problem! The key concept being tested here is Variable Substitution in Linear Equations.
The trap most students fall into: jumping straight to setting up the equation without clearly defining what each variable represents — especially when the answer choices are all in terms of p.
Step 1 — Define variables clearly.
Let c = cost of each pencil (in cents). Then each pen costs c + p cents (since each pen costs p cents more than each pencil).
Step 2 — Use the given ratio to set up an equation.
"8 pencils cost the same as 6 pens" means:
8c = 6(c + p)
Step 3 — Solve for c in terms of p.
8c = 6c + 6p
2c = 6p
c = 3p
So each pencil costs 3p cents and each pen costs c + p = 3p + p = 4p cents.
Step 4 — Answer the actual question.
"Two pencils and one pen" = 2(3p) + 1(4p) = 6p + 4p = 10p cents.
Answer: D (10p)
Takeaway: when a problem asks for a cost expressed in terms of a given variable, express ALL unknowns in terms of that variable before computing the final answer — this avoids the temptation to pick a wrong answer like 8p or 12p that appear when students misread the ratio direction.