I had an instabuddy on a boat dive once several years ago that didn't work out for the first dive, but after I spoke with him, the second dive was much better. First, I made a wrong assumption. I assumed that he was more experienced than me. That turned out not to be true, but funny, he let me think that and did not let me know how inexperienced he was. He had only 20 dives and I had over 150 at the time. I let him lead the first dive. He kept swimming away further and further from the boat, he never turned. Visibility was about 25 feet, so I never lost sight of him. We were at 80 feet and I had 1200 pounds left, I gave the signal asking for his air. I figured we should turn around very soon. He signaled he had only 700 pounds left and turned and started swimming away from the boat again. This puzzled me, but I followed him. When I reached 1,000 pounds, I finally signaled to him to start an ascent. I thought perhaps we would ascend and swim towards the boat at the same time. He headed straight for the surface at probably at three times the recommended ascent rate, so I did not follow him to the surface. I did a slow ascent and when I got to the safety stop, I could see he was already on the surface. I did my safety stop and when I got to the surface, I could see he had swam back a good 200 yards to the boat and was already on the boat.
When I got back to the boat, instead of being angry with him, I asked him how many dives he had. That's when he told he had 20 dives and how much he loved diving. I then explained all the rules he had broken and how much he was putting himself and me at risk. Luckily, he was very receptive and concerned. I asked him to let me lead the next dive and this time, we discussed a dive plan that included navigation, air usage, ascent rate and safety stop. Nothing happened on that first dive, but it could have. I'm a good buddy, but I will not put my own neck on the line for someone who is not following the rules.
I think males may have that "macho" thing going on inside their head that makes them feel that they have to be prepared to rescue someone else, no matter the sacrifice. The next time someone takes off on you, just take a compass heading and go at your own pace. I did this once when I got caught-up in kelp, I finally got myself free and my buddy turned back and we found each other. If your buddy doesn't turn around, after a minute or so, do a slow ascent to the surface, do a safety stop if needed. Number one - take care of yourself. If you feel you need to stop - stop. Panic is your worst enemy.
Obviously, in your situation, your "buddy" was doing great, you were the one getting into trouble. He was not in need of rescue, but you were getting there. When you take a rescue class, it's not all about rescuing someone else. One of the things you learn is how to self-rescue. If you never take a rescue class, just remember this motto from the class: stop, think, breathe.