D = 12 + 9(s - 1)
let's prove above, let's say you only bought one shirt:
D = 12 + 9(1 - 1) = 12 + 9(0) = 12 , since only one shirt was bought only $12 was craged.
let's say you bought two shirts:
D = 12 + 9(2 - 1) = 12 + 9(1) = 21, since the second shirt cost $9 dollars total would be 21. So everything checks out.