Question 12
Two boxes X and Y each have ten numbered compartments containing apples (A) or oranges (O), as shown.

Move[m,n] swaps the fruits between X and Y at every corresponding position m through n. Magic[m,n] changes each fruit in both boxes at positions m through n to the other type. Apply Magic[5,7], then Move[2,5], then Magic[7,10]. How many more apples does X then contain than Y?

Move[m,n] swaps the fruits between X and Y at every corresponding position m through n. Magic[m,n] changes each fruit in both boxes at positions m through n to the other type. Apply Magic[5,7], then Move[2,5], then Magic[7,10]. How many more apples does X then contain than Y?