Quantum harmonic Oscillator analytic method

I'm using a book from Griffiths, I got really stuck about how he arrived at the approximate solution, is it just by trying( trial solution method?), I really appreciate any help on this.

$$-\frac{\hbar^2}{2m}\frac{\mathrm{d}^2\psi}{\mathrm{d}x^2} + \frac{1}{2}m\omega^2 x^2\psi~=~E\psi.$$

Change variables for convenience:

\begin{align} \xi &\equiv \sqrt{\frac{m\omega}{\hbar}}x \\ K &\equiv \frac{2E}{\hbar\omega} \\ \frac{\mathrm{d}^2\psi}{\mathrm{d}\xi^2} &= (\xi^2 - K)\psi. \end{align}

For very large $\xi$:

$$\frac{\mathrm{d}^2\psi}{\mathrm{d}\xi^2} \approx \xi^2\psi.$$

Approximate solution:

$$\psi(\xi) \approx A e^{-\xi^2/2} + B e^{+\xi^2/2}.$$

-

I assume you have no qualms with the "large $\xi$" approximation - it's fairly obvious that $\xi^2-k^2\approx \xi^2$ for large enough $\xi$. After that you're left with the differential equation $$\frac{d^2\psi}{d\xi^2}\approx-\xi^2\psi.\tag1$$ One way to solve this equation is by the method of divine inspiration: you somehow come up with two linearly independent functions you can write down which solve the equation, after which you know what the general solution is.
However, the two functions that Griffiths poses are not exact solutions of that equation, as you would know if you had done your proper diligences. Indeed, $$\frac{d^2}{d\xi^2}\left[e^{\pm \xi^2/2}\right] =\frac{d}{d\xi}\left[\pm\xi e^{\pm \xi^2/2}\right] =(\xi^2\pm1)e^{\pm\xi^2/2}.$$ This means that we're looking for a solution that's approximately valid for the (already approximate) equation (1). As for how one might get such solutions, there's obviously a myriad different possible paths.
One really nice way of deriving the solutions is to factor the offending second-order differential operator into two different first-order operators: $$\left(\frac{d}{d\xi}-\xi\right)\left(\frac{d}{d\xi}+\xi\right) \approx \left(\frac{d}{d\xi}+\xi\right)\left(\frac{d}{d\xi}-\xi\right) \approx \frac{d^2}{d\xi^2}-\xi^2.$$ These are of course approximate inequalities, and of course you must work these out to see what terms got dropped and why.
After that, you can simply work out solutions to the two equations $\left(\frac{d}{d\xi}-\xi\right)\psi=0$ and $\left(\frac{d}{d\xi}+\xi\right)\psi=0$, which are in fact the solutions given by Griffiths. These are first-order equations and therefore simply solvable by integrating. The (approximate) equalities above guarantee that a function in the kernel of either factor will be (approximately) in the kernel of the operator you do care about.