.
Let N be the number of nickels.
Then the number of dimes is (N+5), and the number of quarters is 4N
(in English, "There are 3 times more quarters than nickels" means that
there are 4 times as many quarters as nickels (!!!) ).
So, your equation is
5N + 10(N+5) + 25*(4N) = 1040 cents.
5N + 10N + 50 + 100N = 1040 ====>
115N = 1040-50 = 990 ====> N = is not an integer.
Which means that your condition/problem/formulation is DEFECTIVE.
The cause is that you don't know that in English
"There are 3 times more quarters than nickels" means that "there are 4 times as many quarters as nickels".
Next time be more attentive and more accurate.
Do not forget to send your "Thanks" to me.