In these kind of problems, it is best to set up ratios and you have to be careful with your units.

Price of ground coffee beans: $\displaystyle \frac{d\ \text{dol}}{8\ \text{oz}}$

Ratio of ounces to cups: $\displaystyle \frac{1\ \text{oz}}{c\ \text{cups}}$

==========================

Now I need to find the cost of the ground coffee beans required to make 1 cup of brewed coffee. So, what we do first, is convert 1 cup into oz using the ratio given:

$\displaystyle \frac{1\ \text{oz}}{c\ \text{cups}} \cdot 1\ \text{cup}$

Notice that the cup unit cancel (and don't leave the s behind! :p):

$\displaystyle \frac{1\ \text{oz}}{c\ \text{\rlap{////}{cups}}} \cdot 1 \text{\rlap{///}{cup}}$

$\displaystyle = \frac{1\ \text{oz}}{c}$

Now, last thing to do is to multiply the converted unit with the price:

$\displaystyle \frac{d\ \text{dol}}{8\ \text{oz}} \cdot \frac{1\ \text{oz}}{c}$

Again, the units cancel, leaving you with the price:

$\displaystyle \frac{d\ \text{dol}}{8\ \rlap{//}{\text{oz}}} \cdot \frac{1\ \rlap{//}\text{oz}}{c}$

$\displaystyle = \frac{d}{8c}\ \text{dol}$