I don't know what the question is but I'll try to give the figures based on the transaction.
October 18, 2013 : Upon purchase of shares:
1,000 shares x 30 per share = 30,000
30,000 + 750 commission = 30,750 adjusted basis
December 12, 2016 Upon disposal of shares:
1,000 shares x 42.50 per share = 42,500
42,500 - 1,000 transaction fee = 41,500 realized amount
Gain on sale:
41,500 - 30,750 = 10,750 John's gain upon the sale of the shares.
The gain on sale is identified as long-term capital gain. This is because John held on to his shares for more than a year before selling. He had his shares from October 2013 to December 2016, so more than 3 years.