I'm going to deal in cents to svoid those pesky decimals.
n + q = 30
5n + 25q = 390
First, solve the first equation for either n or q. I'll do n.
n + q - q = 30 - q
n = 30 - q
Now, we can swap any expression for any expression on either side of the =, because equal meeeeeeans they are the same. Since n and 30 - q are the same, I can swap out 30 - q for n in the 2nd equation.
5(30 - q) + 25q = 390
150 - 5q + 25q = 390
150 + 20q - 150 = 390 - 150
20q = 240
20q/20 = 240/20
q = 12 quarters
n = 30 - q
n = 30 - 12
n = 18 nickles
Now we have to check our work.
25(12) + 5(18) = 390
300 + 90 = 390
390 = 390
0 = 0
Boom.