Hannah received $30 for her birthday and bought 3 shirts that were all the same price. If she had $9 left over, which equation shows how to determine how much each shirt cost?

A.3x = 39
B.3x = 30
C.x + 9 = 30
D.3x + 9 = 30