These are derived by the differential operator polynomial. Take one example, if we are going to solve the ODE with source term $R=e^x \cos(2x)$, then the followng substitution steps are probably what you are after.
\begin{align}
y'' - 2y' + 5y = e^x \cos(2x)\implies
(D^2-2D+5)y=e^x \cos(2x)
\end{align}
To find the particular solution, we can divide the operator polynomial
\begin{align}
y_p&=\frac{1}{D^2-2D+5}~e^x~\cos(2x)\\
&=e^x~\frac{1}{(D+1)^2-2(D+1)+5}~\cos(2x)\\
&=\color{blue}{e^x~\frac{1}{D^2+4}~\cos(2x)}\\
&=e^x \Re\left\{e^{2ix}\frac{1}{(D+2i)^2+4}\right\}\\
&=e^x \Re\left\{e^{2ix}\frac{1}{(D+4i)}\frac{1}{D}\right\}\\
&=e^x \Re\left\{e^{2ix}\frac{1}{4i(1-\frac{Di}{4})}x\right\}\\
&=e^x \Re\left\{\frac{-ie^{2ix}}{4}\left(1+\frac{Di}{4}\right)x\right\}\\
&=e^x \Re\left\{\frac{-ie^{2ix}}{4}\left(x+\frac{i}{4}\right)\right\}\\
&=\frac{x}{4}~e^x~\sin(2x)+\frac{1}{16}e^x~\cos(2x)\\
\end{align}
where the second addend as a scaled source term is just a by-product of particular solution.
So the general solution is
\begin{align}
y(x)= e^x[ c_1\sin(2x)+ c_2\cos(2x)]~+~\frac{x}{4}~e^x~\sin(2x), \quad c_1,~c_2~\text{are constants.}
\end{align}
Note that the steps from the colored line are just for illustrations. In reality, one shall use the proved rules such as
$$\frac{1}{D^2+a^2}\cos ax=x\frac{1}{2D}\cos ax=\frac{x}{2a}\sin ax.$$
By the way, I started to learn the operators many years ago, but still have lots of puzzles to understand Heaviside's works.
Just found this might be helpful as well
Solving ordinary differential equations using the differential operator D.