After you file

it would be easier to do arithmetic in ledger format rather than english paragraph format.
1040X just adds the pluses and minus of what you owe and what you already paid.

It then reports the difference.
You really need your originally filed and finally correct tax returns side by side to know what should go on form 1040X.