To beat any "rival", you have to know your own personal strengths, and theirs. That way you can be prepared for what they'll throw at you, and you'll have a plan in place that emphasizes your strengths to overcome their assault and win.
Personal anecdote from the glory days:
Senior year of HS. Racing against a guy who had run 9:06 and 14:55 (3mi.) as a junior, placed high at FL Regionals the year prior. All that jazz. My PR up to that point was 15:31 from junior year on the same 3 mi. course. He was went to another local school so going into senior year I knew I'd race him alot. Should I have had any reasonable expectation to beat him when comparing PRs over 800m? Hell no. But, I had the advantage of being the fastest reurning 800m guy in the state (1:53.9 as a junior). I knew, without a doubt, that I was faster than anybody when it came down to the last 400m of a race. But, I also knew I had to be in a position to actually use my kick for it to lead to success. So what did I do to prepare for that race? I worked on my strength. More mileage, longer intervals. Anything to help me stick with him, so I could then out kick him. What did I do when the gun went off? I held on for dear life. I tried not to listen to the splits at the 1 and 2 mile marks, but I heard them, and knew it was borderline suicidal (for me anyways). But, I was still in it, surprisingly. I wanted to quit. The thought went through my head many many times that last mile. I just put my head down, fought the urge to vomit, and kept going. I pulled my head up after rounding the last bend to see the slightly downhill 300m straightaway to the finish line. I was shoulder-to-shoulder with him. I kinda smiled and did what I knew I could. Put 6 sec on him over that finish.
Know your stengths, know your weaknesses, know your competition. He is better than you at longer stuff right now. Don't be ashamed. Acept it and work on it.