$\frac{p^2}{2m}$ is the Kinetic energy in classical mechanics. However, the same $p^2$ becomes the second derivative $\frac{\partial ^2}{\partial x^2}$ in the Kinetic Energy operator in QM. I mean it is strange that a squaring process of a differential in an operator becomes the double differential. How was it deduced in the first place?
1 Answer
Squaring an operator $\hat{A}$ means composing it with itself $$\hat{A}^{\circ 2}~:=~\hat{A}\circ\hat{A}.$$ Usually, the composition symbol "$\circ$" is not written explicitly.
As for the dictionary between functions in classical mechanics (CM) and operators in quantum mechanics (QM), see e.g. my Phys.SE answer here. In particular, a function multiplied with itself in CM becomes an operator composed with itself in QM (up to possible quantum corrections).