The real difference between selling to close call options (or put options) before expiration and during expiration at market close is that when call options are sold before expiration, they have extrinsic value remaining while those same call options sold at market close on expiration day would have no extrinsic value left.
As such, the profit you get from selling to close call options before expiration is the price you sold for on the bid versus the price you paid for on the ask when you bought them.
For example, AAPL was trading at $90 in February and its March90Call quoted an ask price of $4.15 and a bid price of $4.10. You decided to execute a simple long call options trading strategy and bought 1 contract of March90Call at its ask price of $4.15. After just 5 days, AAPL surges to $95 and its March90Call now quotes an ask price of $7.10 and a bid price of $7.00. You decided to take profit and sell those call options at its bid price of $7.00. You make a profit of $7.00 – $4.15 = $2.85 or $2.85 / $4.15 = 68.7% profit.
In the above example, you would notice that after AAPL surges to $95, its March90Call still has an extrinsic value of $2.00 ($7.00 – $5.00), which is why it still has a bid price of $7.00. If AAPL surges to $95 on expiration of the March90Call itself, those options will be worth $5.00, which consists of only the intrinsic value and none of the extrinsic value. You would then make in profit the difference between this value and the price you paid for, which is $5.00 – $4.15 = $0.85 or 20% profit.
In conclusion, at the same stock price level, it is more profitable to sell the options before expiration than during expiration itself as you can recover some of the remaining extrinsic value. In fact, both scenarios in your question pointed to the correct answer. The difference between the bid price you receive and the ask price you paid is in fact the difference between stock price and strike price (yes, strike price, not price of the stock when you bought it) and what remains of the value of the option (extrinsic value).
Source: www.articlesfactory.com