I'm going to assume that in your scenario, both individuals took a deep breath of regular air before submerging themselves, as this changes quite a lot (you'll see why in a second). Regular air on Earth as you probably know is made up of 78% Nitrogen, 21% Oxygen, and other trace elements like CO2 and ArgonColumbia University. What we care about is oxygen, as this is what our body can't function without.
The air we exhale is approximately 14-16% oxygen , which is a significant decrease, but is still very breathable. If we choose 15% as the exhaled percentage and 21% as the inhaled percentage, the percentage decrease is approximately 29%. Thus, with each breath taken by the other individual the amount of oxygen in the shared air decreases drastically. Another problem is the dilemma of CO2, which is exhaled at a 5% percentage increase. I would imagine the two people wouldn't make it more than a minute before the oxygen level in the shared air is too little to be absorbed and the CO2 makes them both lightheaded to the point where they faint and forget about the tube altogether.
If both individuals had breathed in pure 100% oxygen it would delay their impending deaths but it wouldn't prevent it. I love doing this sort of stuff and could calculate the difference in time between both before the air is unbreathable but...
It wouldn't work. It may sound like something that would work but think about it this way: the very first breath one of them takes it literally sucking the air out of the other's lungs. No matter how much one tries to synchronize breathing in and out with the other - based on lung size, lung volume, diaphragm surface area and many other factors - one's breathing in simply cannot equal the other's breathing out. One of them would eventually breathe in too much, leaving the other choking and gasping for air, leading to a tug-of-war of air, that unless they resurface will lead to both of them drowning.
P.S.Dhami; G.Chopra; H.N. Shrivastava (2015). A Textbook of Biology. Jalandhar, Punjab: Pradeep Publications. pp. V/101.