This is a linear diopahantine equation.

Let x,y,z represent the amount of nickels dimes and quaters respectively.

Then,

x+y+z=24

You also know that,

5x+10y+25z=200

Thus,

x+2y+5z=40

Solve for x in first equation,

x=24-y-z

Thus,

24-y-z+2y+5z=40

Thus,

y+4z=16

Since,

gcd(1,4)=1 which divides 40 there is a solution.

The rest is up to you to solve this.

If you are interesting this is called, Bezout's Identity