That is two equations and three unknown variables. Something must be initially assumed constant. Try taking n as a constant, k=n.
SYSTEM with k=n:
---------------------
2d+5q=200-k
'
d+q=50-k
---------------------
-
-
Try elimination. Multiply the second equation by 2 and subtract from the first equation.
-
Try elimination again for the other variable. Multiply the second equation by 5 and ...
-
A choice must be found of some whole number for k so that d and q each are also whole numbers. MAYBE k=2 worth a test.
k_____________q____________d
2____________34____________14----------Combination appears to work, since k+q+d=50.
----------------------------------------------------------------
ANSWER: A good result then is 2 nickels, 14 dimes, 34 quarters.
----------------------------------------------------------------