Obviously he's reacting to the presence of the other child in some way. My guesses are:

- He sees another kid and would rather play with her than learn Spanish.
- He's just so happy to have another kid there (emotional sensitivity works in all directions) that he's having trouble containing himself.

We see the second thing all the time in DD7's guitar class... she LOVES the class so much that she gets too giddy and silly to focus.