Let N = the number of nickels and Q = the number of quarters

Since we're solving for 2 variables, we're going to need 2 equations.

First, they tell us there are 8 fewer nickels than quarters, so

Q = N + 8

Second, they tell us the total amount and we know a nickel = $0.05 and a quarter = $0.25

0.05N + 0.25Q = 3.50

You can use substitution or elimination to solve the system of equations.

Substitution:

Plug in N + 8 for Q in the second equation, so

0.05N + 0.25(N + 8) = 3.50

Distribute

0.05N + 0.25N + 2 = 3.50

Simplify

0.30N + 2 = 3.50

0.30N = 1.50

N = 1.50/0.30 = 5

Melinda has 5 nickels

Q = N + 8 = 5 + 8 = 13

Melinda has 13 quarters.