While I take no issue with your other lessons, I do think you are minimising the responsibility of your buddy. You went diving with him as a mentor and covered the costs of the dive to get benefit of his experience. He was aware that you were diving in unfamiliar conditions and with unfamiliar equipment, which was why you brought him along as a mentor. He was aware of your equipment issues. He encouraged/pressured you to dive notwithstanding your reservations.It was more like 30 minutes, because I was hanging on the anchor rope for 10 minutes too! That last 10 minutes was the longest 10 minutes of my life. He said later that he thought I was just photographing stuff. And to be fair, I told him that when I start taking pictures, I might stay in one place for a long time trying to get a shot. I am not making excuses for him ... he could have been a better dive partner for sure, but (1) I should not have dived at all under the circumstances, especially not in such a new environment for me, and (2) I was out of practice on a basic emergency skill and that played into the whole mess; swapping regs and clearing is something that needs to be practiced all the time so you don't need to think about it in an emergency - that is one of the important lessons I learned. I had done this a hundred times in the past both in practice and actual emergency situations, but that was years before this incident and I never thought about how important it was to keep practicing those skills.
But lets say he was a contributing factor. Even so, I think it is important to dive as if you were solo; unless you are lucky enough to have a good friend you dive with all the time, relying on a buddy who is really a stranger to save you is a bad idea IMHO. Absent some extreme and completely circumstances outside of my control, like a sudden current, medical issue, shark bite, or the like, my dive buddy should never have to "rescue" me IMHO. Like I said, I have had to rescue divers twice and it was those experiences that led me to dive with a pony bottle even before this. Now, I assume my dive buddy will be a complete idiot, and that in no event will he ever be able to assist me in an emergency. With that mindset, I feel a lot safer. And if I have [a rare] buddy who is actually prepared and trained, that is gravy but not something I expect.
Gong back to lessons learned, in my opinion the lesson here was NOT that my buddy made mistakes or that he could have been better. The lesson I learned was that I need to be completely self-sufficient, and make judgments based on my own feelings and *not* rely on a buddy, even an expert diver, or DM, to provide that judgment. Just my two cents, and obviously you can find lots of lessons here.
Self sufficiency notwithstanding, this was not a solo dive, this was a buddy team dive. This wasn't a random instabuddy team either, you chose him as a buddy and he knew he was not just a buddy, but also a mentor.
This buddy/mentor was nowhere in the vicinity during half an hour that you were struggling to not drown. That, to me, is completely unacceptable conduct on his part.
That doesn't negate your lessons, but maybe another lesson is "don't ever be that sort of buddy when diving in a buddy team"
Glad you survived and got back into it.