Suzie buys a salad for $5.12 and is given $14.88 as change. Which equation represents the situation if x is the amount Suzie had before she bought the salad?

A. 5.12x = 14.88
B. x - 5.12 = 14.88
C. 14.88 - x = 5.12
D. x + 5.12 = 14.88