Answer:
1.) Coffee Problem:
For d dollars, you make 8c cups of coffee. So each cup of coffee costs d/(8c) dollars.
2.) Carpeting Problem:
"Square yard" means “平方码”. So 12 feet by 18 feet means (12/3) yards by (18/3) yards, or 4 yards by 6 yards, which is 4x6 = 24 square yards.