I don't think you did anything wrong, and I'd probably have done the same thing in your place. Lose your buddy, look where you think they might be for a reasonable period (sometimes a minute is reasonable, and sometimes you pretty much know you aren't going to find them, so you search for a shorter time). Then ascend, at a safe speed. Once you got up and saw the bubbles, you knew your buddy was breathing, and they were getting bigger, so he was coming up. Going back down and connecting with him, if the conditions made it likely that you COULD do that, wasn't unreasonable. And if you were that early in the dive, I think going on and continuing wasn't out of line, either.
I think I would have done what you did. Whether that makes it right or not is probably arguable. But I would have done it.