Answer
David had $5n+10d+25q$ cents.
Work Step by Step
We multiply $10$ by $d$ because each dime is worth $10$ cents, multiply $5$ by $n$ because each nickel is worth $5$ cents, and multiply $25$ by $q$ because each quarter is worth $25$ cents. We then must add these three terms to get the total number of cents that she has in her bank: $5n+10d+25q$.