if you are saying purchasing 3 social media ads and one newspaper ad counts as one purchase then there are:
if you are asking how many of each then:
18 social media ads
6 newspaper ads
taxable income = $31000
as per the 2018-2019 us tax bracket, the tax rate is 12% for an individual whose taxable income is between $9,526 to $38,700.
so, the tax to be paid by him = 12% of 31000
= 0.12 * 31000 [12% converted to decimal as 0.12]