Question 827181
The second part, "if", means different coefficients.

Pennies, 0.01 dollar per coin or 1 cent per coin;
Quarters, 0.25 dollar per coin or 25 cents per coin.


You already have your counts, n and d.  Now, each counts some other coin value, but still the same n and d.
Keeping the equation in cents, {{{1*n+25*d=170}}}.


System to solve is:
n+25d=170 and 5n+10d=160



------
Simplify the "160" equation by multiplying left and right sides by (1/5) to have n+2d=32