I agree with Gallop On.
One suggestion is to make the barn-sour horse work near his buddy. Work him well. Lunge him or ride him, whichever is safer. Then let the horse rest far away from the buddy. The point is to show the horse that when he is near his buddy, he will have to work, but when he's away, he can rest. Horses are lazy, they like shortcuts and not working so when you make them, they will also respect you more and pay more attention to you instead of their buddy.