From: Charlottesville, VA
OK, I've done some testing.
Austria and Prussia are allies
Russia and Turkey are allies
Everyone is at war with each other, except Austria and Russia, who have an enforced peace.
A series of battles fought in Masovia with Ru/Tu as defenders
#1--Prussia loaned to Austria. Russia loaned to Turkey.
Austrian-led army engages only the Turks. If Au/Pr win, then Russian troops are repatriated to Moscow. If Turks win, Russians remain in the space.
#2--Prussia loaned to Austria. Turkey loaned to Russia.
Austrian-led army moves into Ru/Tu space, but no battle takes place. Turks are immediately repatriated to Constantinople. Austria, Prussian and Russian troops remain in the space, even though Prussia and Russia are at war.
#3--Prussia loaned to Austria. Turks and Russians aren't loaned to each other.
Austrian-led army engages only Turks. If Turks lose, Russians again remain in the space without fighting the Prussians.
#4--Austria loaned to Prussia. Russia loaned to Turkey.
Only Prussian corps engage Turk-led army. Austrians remain in the space if Prussians win or are repatriated to Vienna if Prussians lose.
#5--Austria loaned to Prussia. Turkey loaned to Russia.
Same results as #4.
#6--Austria loaned to Prussia. Turks and Russians not loaned to each other.
Same results as #4.
If you are at war with two powers that are likely to be defending in the same space and your ally is only at war with one of those powers, best loan your corps to your ally and let him lead. At most you will only fight your common enemy. If you do the reverse, then you will have to fight the battle against both your enemies on your own as your ally watches. And if you lose, your ally gets a free trip back to his capital.
As the defenders, if you know you will be moving first, best not to loan corps to each other that will be stacked together. If loaning is necessary, have the power closest to his capital city do the loaning.
Finally, the results in #2 and #3 are a bit disturbing in that two powers at war with each other can end up in the same space and not have a battle.