BA Swings to Profit in Third Quarter