We were taught to use the Heaviside operator $D: \dfrac{d}{dx}$ to solve an ODE, for example,
Consider $y'' + 3y' +2y = e^{-2x}$
$$\implies (D^2 + 3D + 2)y = e^{-2x}$$ $$\implies y = \dfrac{1}{D^2 + 3D + 2} e^{-2x}$$ $$\implies y = \dfrac{1}{(D+1)(D+2)} e^{-2x}$$ Now we substitute $-2$ in place of $D$, in this case the denominator becomes zero, so we differentiate the denominator with respect to $D$ as if it's a variable and multiply$^*$ a factor $x$.
$$ y = \dfrac{x}{(D+1)+(D+2)} e^{-2x}$$ And then do the substitution $$\implies y = -xe^{-2x}$$
How is this possible, how are we able to treat an operator $\dfrac{d}{dx}$ like a variable? What does differentiate with respect to $D$ even mean?
$*:$ I also don't understand why we multiply $x$ in the numerator
Reference: https://www.youtube.com/playlist?list=PLEC88901EBADDD980
In the QM version of Operator Calculus as I learned it at the university, a formula is derived that should be stored in non-volatile memory. It's in the box near the bottom of our general theory: $$ \large \boxed{\; \frac{d}{dx} + f = e^{-\int f \, dx}\, \frac{d}{dx}\, e^{+\int f \, dx } \;} $$ Strangely enough, you have actually derived part of this memorable formula yourself, in this answer, where you write: $$ D[e^{at}\,y(t)]=e^{at}(D+a)[y(t)] $$ From which the equivalent follows: $$ \left[\frac{d}{dt}+a\right]y(t) = \left[e^{-at}\frac{d}{dt}e^{+at}\right]y(t) $$ Herewith your problem can be solved. Note that there are no fractions involved with $D=d/dx$ in the denominator. $$ \left[\left(\frac{d}{dx}\right)^2+3\left(\frac{d}{dx}\right)+2\right]y=e^{-2x}\\ \left[\frac{d}{dx}+1\right]\left[\frac{d}{dx}+2\right]y=e^{-2x}\\ \left[e^{-x}\frac{d}{dx}e^{+x}\right]\left[e^{-2x}\frac{d}{dx}e^{+2x}\right]y=e^{-2x}\\ \frac{d}{dx}e^{+x}.e^{-2x}\frac{d}{dx}e^{+2x}y=e^{-x}\\ e^{-x}\frac{d}{dx}e^{+2x}y=\int e^{-x}dx = -e^{-x}+C_1\\ \frac{d}{dx}e^{+2x}y=1+C_1e^{x} \quad \mbox{(!)}\\ e^{2x}y=\int \left[ 1+C_1e^x \right] dx = x + C_1 e^x + C_2\\ y = x.e^{-2x} + C_1 e^{-x} + C_2 e^{-2x} $$ Where the constants $C_1$ and $C_2$ are still to be determined from initial or boundary conditions.