Unknown halogen X2 was added to each of two test tubes which contained aqueous NaCl and aqueous NaI, respectively. When hexane was added to the test tubes, an orange color developed in the top layer of the first test tube, while purple developed in the second.

a. Identify X2.
b. Write a balanced equation for each reaction which occurred.