This isn't really a tax question, because the buyback and reissue of the shares do not create any income or deductions.
The buy back would be an entry similar to
Dr Treasury Stock
Cr Cash
The reissue would be an entry similar to
Dr Stock Dividends (if the remaining shareholders didn't pay for the additional shares).
Cr Treasury Stock
Make sure you make appropriate entries in the stock register.