sentence1: But this problem was quickly resolved when McCain, who was attending the lunch as a guest of U.S.
sentence2: This problem was quickly resolved when McCain arrived together with his wife to attend the lunch as a guest of U.S.