Changing The Shape of a potential well

This question was posed to me a while ago, but I never fully understood how to solve it.

You have a particle in the first excited state of the infinite square well (with the origin taken to be at the center. You "abruptly" change the shape of the potential well to be that of the harmonic oscillator and characterize the immediate result on the wave function

Which energy eigenstates of the harmonic oscillator are excited, and how quickly (roughly) must this change be made for it to be considered abrupt?

I think I see that ALL of the odd states of the harmonic oscillator should be excited since you were in an odd state of the infinite well, and I think classifying abrupt has something to do with the energy time uncertainty principle, but I am not sure what value to use for delta-E

Any help is much appreciated

Well, in order to figure out which states of the harmonic oscillator are excited, you'd need to decompose the first excited state of the infinite square well in terms of harmonic oscillator eigenstates. So if $$|\psi_m\rangle$$ is a square well eigenstate and $$|\varphi_n\rangle$$ is a SHO eigenstate, any state for which $$\langle\psi_1|\varphi_n\rangle \neq 0$$ will be excited. Offhand I suspect that that's going to be true for all odd n (i.e. that your thought was correct).
If the potential replacement is made instantly, your initial state $$|\psi_m\rangle$$ does not change. You just have to represent it in a different basis (oscillator wave functions). I think the previous post explanation and Wikipedia reference are good for your purposes.