Start writing the equation of the number of coins
then, using the value of each coin write the equation for the amount of money you have
then, use the first equation to solve for d
substitute in the second equation
simplify and solve for q
find the value of d