In general in a failure in a cave environment, you want to place the diver with the failure in front where you can keep him under observation.
Setting the pace with an OOA failure is a non issue as the odds are he or she will be highly motivated to exit, so too slow is not an issue, and too fast is something you can control as you have the gas and the OOA diver cannot proceed any faster than the second stage on the end of the hose is moving.
As an aside, if it's a light failure, you can more effectively light the way for them if you are trailing behind than you can if you are leading, so again in a light failure, the person with the failure is in front.)
Marci and I have practiced air sharing in side mount through a fairly snug passage on a 5' hose and we've confirmed we can make adequate headway, and I think having the diver with the failure lead ensures that that diver does not get left behind or gets the hose popped out of his or her mouth.
In OW side by side makes sense as their is no need to move into a trail formation.
I agree with Marci that unclipping is potentially a slow process, and in a tight tunnel it will greatly increase the silt issue, meaning that in a tight and fluffy bottomed tunnel you'll be swapping tanks in zero viz while also having to pass them forward and back wards to complete the swap. That's an idea that has "bad" written all over it. From that perspective, swapping tanks is something that works best in a larger tunnel, and if you are in a larger tunnel, you no longer have any need.
Consequently, if a total OOA failure (extremely unlikely in SM) occurs in a snug passage, you share the long hose until you are in a larger tunnel, then continue sharing on the long hose. If you still had a long length of restrictio to pass through, you'd then have to weigh the time and gas needed to swap tanks with the reduced speed through the restriction - and I'd still be inclined to share on the long hose unless the restriction were really long and really tight and/or required a great deal of body or equipment manipulation to get through.
Realistically, you won't encounter a total gas failure, so it's more of a gas planning issue in terms of ensuring that the diver with a tan or reg failure has enough gas in the remaining tank to get through any restriction on his/her own, eliminating the need to share gas in spots where it might slow you down. In that scenario the gas sharing would occur in the larger tunnel between restrictions.
However, with proper gas planning and gas management, it will never be neccesary as a sidemount diver will reach maximum pentration with (at least) enough gas in either tank that equals the amount used from both tanks to get to that point. In other words, he or she will use 1/3rd of the gas in each tank reaching the turn point, thus still having 2/3rds left in each tank. You can make it more conservative by reducing the "third" from (for example) 1200 psi to 1000 psi which will leave an extra 400 psi in each tank above "thirds" as a pad at the turn point. That is also a rationale that is used by SM divers who do not have a long hose at all, and there is nothing wrong with that reasoning - but it does require discipline on the team.
Now in mixed BM/SM teams, a total gas loss by the back mount diver is a possibility and for that reason a long hose is essential for the SM diver.