Wish Upon a Star

The two Wheaton sisters share a household and a high school, but both feel that they have little else in common. 18-year-old Alexia's (Katherine Heigl) days revolve around being popular, dressing stylishly, and spending time with her jock boyfriend, while exerting minimal effort academically. While 15-year-old Hayley (Danielle Harris) is socially reserved, admiring her older sister's popularity from a distance while excelling in her studies, particularly science and mathematics. Hayley and Alexia don't get along well at all, with Hayley resenting her reliance on her frequently late sister for a ride to school and Alexia preferring not to be seen with her less-than-cool younger sister.
One night, Hayley is outside studying the night sky for her science class, while Alexia relaxes in the outdoor hot tub with her boyfriend, Kyle (Don Jeffcoat). When Hayley sees a shooting star, she wishes aloud to become her sister Alexia, then turns to see Alexia also watching the sky. The two of them awaken the next morning to find themselves trapped in each other's body. Hayley assumes responsibility for the swap, mentioning her wish.
Distraught, Alexia forbids Hayley to go to school in her place, and she instigates a variety of wish-making attempts for Hayley to reverse their condition, all of which are unsuccessful. Hayley is content to fill her sister's role for the day, as she can now experience the glamor of Alexia's life firsthand.
After the first day ends, they realize that they may be stuck like this for a while. They each spend the next day purposely trying to ruin anything important to the other, such as their social reputation and extra-curricular activities. Hayley (in Alexia's body) wears the same outfit that she had worn the day before, and Alexia (in Hayley's body) goes to school dressed up as a dominatrix.
Their parents choose not to interfere, as they had just started a "hands-off" approach to parenting. Eventually Hayley and Alexia learn to look at their lives with new perspective. As they each become accustomed to the other's life, they begin to relate to one another better and become closer as sisters.
While spending an evening outside searching for a shooting star to make their wish to switch back, they decide to spend one more day as each other. Hayley's task (in Alexia's body) is to help convince her teachers that Alexia is not an "airhead," and Alexia (in Hayley's body) is to help show Hayley how easily Hayley can get a guy.
Hayley's and Alexia's plans work, and they decide that it's time for them to switch back. Unfortunately, that night they fall asleep early; Hayley wakes up during the night in time to wish on a star. When she awakens the next morning, she finds that they didn't switch back and believes that they will never be able to return to their own bodies, but she doesn't tell Alexia.
Alexia and Hayley attend the Winter Festival dance, where Hayley breaks down and tells Alexia that they can't switch back. Alexia then confesses that she saw the first shooting star when she was with Kyle and wished to be Hayley, since she had been jealous of Hayley's intellect and well-structured plans for her future.
Realizing that it was their combined wishing that caused their switch, they sit outside and, seeing a shooting star, wish together to be themselves again. Opening their eyes, they are delighted to see their wish has come true. They return to the Winter Festival, where Alexia is crowned queen. She then dances on stage with her boyfriend, while Hayley finds their new neighbor Simon and dances with him.

Question: What caused their switch?
Answer: Combined wishing on a shooting star; Combined wishing on a shooting star