You have one diver who is now in an emergency situation (OOA) according to all I have learned in six months of diving and reading profusely here and about 20 books, and probably 10-20 blogs... that one single fact becomes the limiting criteria in the scenario. How much air diver B has in their tank is now IMMATERIAL, and given the depth, you surface immediately on shared air and do not worry about a safety stop... even if the dive profile included 12 minutes at 100ft, you might go to 20 feet and ride it out until your tanks on fumes, but it seems that surfacing and being done for the day is the better part of valor, and safer choice overall.
Speaking as a guy who took a chamber ride after a recreational dive within NDLs, I disagree with this statement. If you can make a safety stop, you should. That means, if you and your buddy are sharing gas from a single tank, an there is enough gas for you both to spend 3 minutes at 15 feet, you should do it.
Obviously, a safety stop is by definition not "required", but we shouldn't go overboard in minimizing it's importance - especially if there has been significant nitrogen loading during the dive. Everyone bubbles after an ascent, but it's not clear why some people develop DCS after limited profiles and others remain without symptoms despite more aggressive dives, even after missed deco. Remember too that in a situation like the OP described, someone is likely to be panicked and surfacing faster than the recommended rate as well, which also contributes to DCS; a safety stop has the added benefit of limiting the ascent time.
Obviously, having something to breathe is more important than anything else. But even in an air sharing situation you can calm down, assess your options and make a smart decision.