Let q be the number of quarters and d the number of dimes, both nonnegative integers. We want q.
Statement (1): q + d = 8 leaves q free, q could be 0 through 8. Not sufficient.
Statement (2): 25q + 10d = 155 has more than one nonnegative-integer solution, (q, d) = (1, 13) gives 25 + 130 = 155, and (5, 3) gives 125 + 30 = 155. So q is not determined. Not sufficient.
Together: solve q + d = 8 and 25q + 10d = 155. From the first, d = 8 − q; substitute: 25q + 10(8 − q) = 155 ⇒ 25q + 80 − 10q = 155 ⇒ 15q = 75 ⇒ q = 5 (and d = 3). Unique; neither alone.
The (B) trap takes the value equation as enough, but 25q + 10d = 155 alone admits multiple nonnegative pairs. The (A) trap over-credits the coin count. Both equations together pin the unique pair.