Net section 1256 contracts loss Carryback to prior year

I’m not sure of the calculation to carryback my net section 1256 contracts loss to a previous year.   

Form 6781 instructions say

 

Your net section 1256 contracts loss is the smaller of:
1.  The excess of your losses from section 1256 contracts over the total of (a) your gains from section 1256 contracts plus (b) $3,000 ($1,500 if married filing separately)

OR
2.  The total you would figure as your short-term and long-term capital loss carryovers to 2023 if line 6 of Form 6781 were zero.   I know how to get this number so we will only discuss the first option above.


How do I calculate the first option shown above? 
I interpret the rule to choose the calculation A below.  Is the correct method A or B?

 

A.  Excess net section 1256 contracts loss over gains -20,000

Capital gains stocks +2000  (ignore - the instructions above don’t mention stocks!)

Plus +3000

Excess net section 1256 contracts loss over gains -17,000  to carryback to previous year 

 

I found an old post and this is how they explained it in example. 

 

B.  Excess net section 1256 contracts loss over gains -20,000

Capital gains stocks  +2000

Net losses on both combined -18000

Plus +3000

 

Net section 1256 contract loss  -15000 to carryback to previous year.  This option is forcing you to take an overall 3000 loss on current taxes.