A nickel is equivalent to 0.05 dollars while a penny is equivalent to 0.01 dollars.
a) Therefore if D is the total number of dollars,
Therefore, the answer to the first question is 4.5 dollars.
b) Similarly, if one has x nickels and y pennies,
The answer to the second question is 0.05x+0.01y