My suggestion is that both authors be treated as equal contributors. That is to say that neither contribution seems "greater" than the other.
However, the contributions are a bit qualitatively different and if you want to spell that out, though not everyone thinks it necessary, write a contributions section (or acknowledgements) in which you mention the specific contributions of each.
This seems pretty close to pure math, actually, where the assumption is equal contributions. It is possible in math for someone to make a vital, indispensable, contribution to a paper in a five minute conversation in which they supply the key insight lacking in the other(s).
But your description describes the more normal back-and-forth in which each contributor advances not only the product but also the understanding of the other. Author order could be alphabetical as is typical in pure math.
I do, however, have a bias toward equal contribution in all but edge cases. And I am a co-author on one of those edge cases. It was obvious and so we made an exception.
I also fear there is a dispute lurking behind your question. I suggest you try to work beyond that. Such disputes don't lead to future collaboration that might be beneficial to everyone. Generosity may even be called for. Pistols on the Green at dawn isn't a good long term career strategy.