Anna and David left an 18% tip after having dinner at a restaurant.The amount of the tip was $9. Anna's dinner cost $28. Which equation can you use to find x, the cost of David's dinner.

A. 0.18(x+28)=9
B. 0.18x+28=9
C. 18(x+28)=9
D. 0.18x=28+9