PADI training dictates it is acceptable to share your primary second stage or your octopus with a buddy in need of air.
It is a good idea to work this out with your buddy ahead of time. Should the need arise, it could lead to an awkward underwater shuffle if a buddy needs air and doesn't know which to take; trust me, this is not the time where you want to be doing underwater choreography. This frustration may lead to panic---a bad situation for everyone.
So take a quick second and decide which second stage is for sharing. Your oxygen-soaked brain may thank you for it someday.