You've got 30 dives, and all your own gear, yet you consider yourself a newbie and you act like one.
Not monitoring your air, not taking the DM's octo when you were already breathing hard were huge mistakes, offering your primary reg to the DM to see if you were doing something "wrong" when you were obviously OOA, completing your safety stop when you AND the DM are BOTH out of air were others, although that last one is on the DM although it's hard to believe there is such a level of incompetence in a supposedly trained professional that would require both of you to make an emergency ascent from safety stop depth and risk an AGE because you just HAD to complete that last 60 seconds of safety stop following a relatively shallow dive. I don't think I've seen this level of combined ineptitude in a single dive.
Where was your dive buddy when all of this was happening?