In Griffiths Introduction to Quantum Mechanics, when discussing ladder operators in Chapter 2, he write Schrodinger's equation as, $$ \frac{1}{2m}\left[\left(\frac{\hbar}{\mathrm i}\,\frac{\mathrm d}{\mathrm dx}\right)^2+\left(m\omega x\right)^2\right]\psi=E\psi\tag{2.40} $$ Then he says,
The idea is to factor the term in the square brackets. If these were numbers, it would be easy: $$u^2+v^2=(u-iv)(u+iv).$$ Here, however, it's not quite so simple, because $u$ and $v$ are operators, and operators do not, in general, commute. Still this does invite us to look at the expressions, $$ a_\pm=\frac{1}{\sqrt{2m}}\left(\frac{\hbar}{\mathrm i}\frac{\mathrm d}{\mathrm dx}\pm m\omega x\right).\tag{2.41} $$
What is behind this idea to factorize? Equation 2.40 doesn't seem like it could be solved by factorising the term in the brackets. After all, the R.H.S of 2.40 is not zero, then why would one factorise to solve?