The thing with writing a rivalry is simply a matter of perspective. I had an intellectual rival in secondary school that I had never really spoken to, but we both consistently competed for the top academic prizes. I also had one in primary school, and we just so happened to be best friends.
The thing with rivals is that they tend to be very similar. If you think of Harry Potter and Draco Malfoy, they are both clever, ambitious, talented, loyal, affable and great at the same sport in the same position. The Sorting Hat almost put Harry in Slytherin because he and Malfoy had such similar characteristics, and if he had ended up there it's very possible that they could have been the greatest of friends, very much the James Potter and Sirius Black of their generation.
All of their disagreements stem from where they differ: hunger for glory vs unassuming heroism, following a dynasty vs being independent, unquestioning leadership vs deferring to friend's counsel, selfishness vs willingness to sacrifice. That is why their relationship is antagonistic; they focus on where they differ. Had they focused on their similarities, they could very well have gotten along fine.
The thing that is consistent with rivalries, whether they're between friends or enemies, is that they cause each person to push each other further in order to stay ahead. This could be academically, professionally or athletically, or all of the above and more, the point is that each person sees themselves in the other person and wishes to be the one who does it better.
So rather than making rivals complete opposites, they need to be two sides of the same coin. Not necessarily identical, but similar enough that they will have a lot of parallels, and they will forever be comparing those parallels in order to try to be the one who is the best. It won't even matter that much if there are other people who are better than both, it will come down to who out of the two of them is more successful at their sport/job etc.
So if these rivals are at odds with each other, it will be because of their differences, which will be what you need to focus on as their earliest interactions. Then when their similarities become clear, they will use them to push each other to be better, in order to try to come out ahead of the other. But remember to keep in mind that when they're facing off against each other that in another universe, they are the best of friends.