Answer: a. additional paid-in capital to the extent that previous net "gains" from sales of the same class of stock are included therein; otherwise, from retained earnings.
Explanation:
When a stock is sold for higher than its par value, the additional value is recorded in the additional paid-in capital account as a gain to equity.
If a treasury stock is sold for less than its cost, the difference between the selling price and the cost will be deducted from the additional paid in capital account but the only amount that is deductible is the gain that the company has made so far from selling stock above their par value.
If the loss from the treasury stock is more than this gain, the remainder will be deducted from the retained earnings account.