If you have 1 nickle, how many quarters do you have? (3)
If you have 4 nickles, you have 3 times as many quarters (3)(4) = 12
If you have n nickles, then you have 3n quarters so 3n = q, you have a slightly different equation.
If you fix this equation and use substitution like you did, you can get the right answer; you can also try to work in the other information that you have - converting all coin values to cents
5n + 10d + 25q = 460