It's unclear what you're asking. When I originally read your question, it seemed that you had closed out one options position and opened another. When I read your question the second time, it seemed that you were writing a second option while the first was still open.
In the second case, you have one covered and one naked position. The covered call will expire worthless, the naked call will expire in the money. How your broker will resolve that is a question best left for them, but my expectation is that they will assign the non-worthless calls. Whereas, if both options expired in the money, you would be assigned and you would have to come up with the additional shares (and again, that depends on how your broker works).
In general, for both cases, your net is the premiums you received, plus the difference between strike price and the price that you paid for the stock, minus any cost to close out the position. So whether you make a profit is very much dependent on how much you received for your premiums.
Scenario #1: close first call, write second:
- 5000 = Original stock price: $50
+ 200 = Received premium of $2 for ATM C50
- 25 = Paid premium of $0.25 to close C50
+ 400 = Received premium of $4 for C40 when stock is at 43
+ 4000 = Received when options are assigned
- ? = Commissions on 5 trades
Scenario #2: write covered + naked, one expires worthless
- 5000 = Original stock price: $50
+ 200 = Received premium of $2 for ATM C50
+ 400 = Received premium of $4 for C40 when stock is at 43
+ 4000 = Received when options are assigned
- ? = Commissions on 4 trades
Scenario #3: write covered + naked, both expire in the money
- 5000 = Original stock price: $50
+ 200 = Received premium of $2 for ATM C50
+ 400 = Received premium of $4 for C40 when stock is at 43
+ 5000 = Received for C50 when options are assigned
+ 4000 = Received for C40 when options are assigned
- 5500 = Paid for stock to cover naked options; stock is now at $55
- ? = Commissions on 6 trades
- ? = Margin interest if you don't have cash/stock to cover C40
Disclaimer: the SEC does not consider me a financial/investment advisor, so this is not financial/investment advice