Personally, based on what we know and where we are right now, I'm inclined to think that Luffy and Law will either be very friendly rivals after their alliance–as in, mostly friends with a minor rivalry--or not be rivals at all. It would make sense for Luffy and Kid to have a stronger "rivalry" (even though, yeah, from a reader's perspective, it's clear Luffy is certainly superior) because Kid has all-but-explicitly stated that he wants to be Pirate King, but as far as I remember, Law has not. There were some things in his earlier appearances that might've implied that was his goal, but based on stuff that we've learned since then, it's pretty clear that, if Pirate King has ever been something that's interested him, it's played a distinct second fiddle to his dream of avenging Cora-san and bringing down Doflamingo. Hell, he's hinted multiple times that he was prepared to die doing so and even somewhat expected to, and was okay with it as long as his dream succeeded.
Now that it has and he's free to live his life how he wants, maybe he will decide to pursue the PK throne more seriously, but at this point, after everything he's seen of Luffy–his personality, what he can do, innate abilities he was born with like CoC and VoAT--it wouldn't surprise me if he decides to endorse Luffy as the "D" carrier most worthy of holding the title. Regardless of what he chooses to do, while things could potentially change by the end of the arc, it currently seems pretty likely that they'll remain on friendly terms even after their formal alliance is done.