When it comes to being which trainer is Ash's best rival, i would say either Gary or Paul. Even though I think Paul is a slightly better overall rival for Ash than Gary, My favorite of those two would be Gary. Gary was the first rival Ash had and obviously they go way back to long before their days in Pokemon Training and while compared to Paul, screentime is miniscule, he was well developed in personality and even in strength. He went from a cocky and overconfident weakling belittling Ash to being more humble and modest while still being stronger every time he and Ash met, and if it weren't for the fact that Gary only competed in 2 leagues as opposed to Paul 3 at the time now 4, id say Gary would be a bit stronger than him but that isnt the case is it? Every when Gary went all friendly and humble, he still is good enough to take on Ash in his prime, even defeating Ash in a one on one battle with Electivire vs Pikachu right after Pikachu whooped Regice's bee-hind. With Paul you have an awesome backstory and a powerful motive driving him to pursue strength and power like madness, and with the most well executed development he received pertaining to the rivalry, I would consider Ash rivalry with Paul much better than his rivalry with Gary in that regard. There was even more tension to it and it all culmunated to its peak during and after the full battle they had at Lake Acuity, all coming to a head and climaxing at the Sinnoh League in their full battle rematch. While it is hard for me to say which rivalry between Paul, Gary, and Trip or moreso Paul and Gary since Trip and his rivalry with Ash was a total flop from the start all the way to the don battle and flopped even more from there but I digress. While it is hard for me to say who out of Paul and Gary had the best rivalry with Ash, I would only choose Paul by a hair, but the rivalry with Gary is my all time favorite.