Line 1 - On the first line, you BOUGHT a Jan '25 250 strike call for $7500, that gives YOU the right to buy the stock at 250 anytime between now and when that call expires (1/17/2025).
Line 2 - On the second line, you SOLD a Jan '24 340 strike call for $1400, that gives the purchaser the right to buy the stock FROM YOU anytime between then and when that call expires.
Line 3 - On the third line, you BOUGHT BACK the Jan '24 340 call and SOLD a new Jan '25 350 call for net cash of $1400. That Jan '25 350 call gives the PURCHASER the right to buy the stock from you at 350 at anytime between then and when it expires (1/17/2025).
In January of 2025, the stock will very likely be 360 or higher. The person holding the 350 strike price call that YOU sold to them will exercise it against you and BUY the stock from you for $350. That’s how options (in the USA) work.
People really need to educate themselves about how options work before dabbling in them. There are plenty of decent online places to do so, and it only takes a few hours of effort. There’s also an options discussion board here, but not nearly as active as it used to be now that they’ve effectively killed off most popular boards.
Another name for this trade is a “spread”, specifically a “bull call spread”. First a kind of calendar spread (where the two options, the short one, and the long one, have different expiration dates). And then later (after the roll) converted to a regular 250/350 bull call spread. With a bull call spread, the maximum gain occurs at the higher short option strike price, any price above that level adds no gain to the trade (because the owner of the short option you sold gets that part of the gain). In this particular example, if the stock is 360, you get the gain between 250 and 350, and the person holding the 350 call you sold gets the $10 above 350.