Let the number of nickels and let the number of dimes. Nickels are worth $0.05 and dimes are worth $0.10, so:

(A) (B)

Solve (A) for n:

Substitute into (B):

Multiply, and combine like terms:

The solution of this equation is , which gives you .