The Hamiltonian for the quantum harmonic oscillator is
$$\hat{H}=-\dfrac{\hbar^2}{2m}\dfrac{\partial^2}{\partial x^2}+\dfrac{1}{2}m\omega^2 x^2$$
and one can try to factorise it by writing down what later on will turn out to be ladder operators of the eigenspectrum
$$\begin{align}\hat{A}&=\sqrt{\dfrac{m\omega}{2\hbar}}\left(\hat{x}+\dfrac{i}{m\omega}\hat{p}\right)\\ \hat{A}^\dagger&=\sqrt{\dfrac{m\omega}{2\hbar}}\left(\hat{x}-\dfrac{i}{m\omega}\hat{p}\right)\end{align}$$
Now, in a problem class I'm supervising, the students were asked to "show that we can express the Hamiltonian $\hat{H}$ in terms of $\hat{A}^\dagger$ and $\hat{A}$", with the idea of obtaining the relation
$$\hat{H}=\hbar\omega\left(\hat{A}^\dagger\hat{A}+\dfrac{1}{2}\right)$$
The way the solution to this question is laid out is that the students should simply "guess" the combination $\hat{A}^\dagger\hat{A}$ is the right way to go, or get there by trial and error.
Question: what's the best/most intuitive way to explain why this is the case?
Writing $\hat{p}=-i\hbar\partial_x$, it's easy to justify taking some form of quadratic form of the operators, but why not e.g. just square them?