This morning my dive buddy and I were descending nicely towards Fog reef when passing through 12 metres my buddy motioned that he was having problems with his ears and that he wanted to go up. I thought it was just a matter of ascending a little way so he could equalise.Wrong. When I looked again I could see he was struggling with his balance. I placed his hand on the shot line and as he was finning ok and he was upright I moved to keep pace and guide him. It was then that I realised I was in trouble too. My respirator mouthpiece had blown out and every breath was a mix of air and water.My thoughts have never moved so fast. I couldn't let him go,I was looking up thinking I could make it and I was starting to panic. I was arguing with myself about switching respirators when thankfully my training kicked in and I did switch. I can't believe how fast this all happened. My buddy and I surfaced alright but I was shitting bricks. I am a novice diver and I was quite embarrassed that I had started to panic but I realised that the situation was not of my making and my training did work.2 hours later my next dive was much more relaxed.