For a differential equation $$\dfrac{d^ny}{dx^n}+P_1\dfrac{d^{n-1}y}{dx^{n-1}}+P_2\dfrac{d^{n-2}y}{dx^{n-2}}+\cdots++P_{n-1}\dfrac{dy}{dx}+P_ny=X$$
i,e., $$F(D)=D^n+P_1D^{n-1}+P_2D^{n-2}+\cdots++P_{n-1}D+P_n$$
where $P_i(i=1,2,\dots, n),X$ are functions of x and $D\equiv \dfrac{d}{dx}$
if $X=e^{mx}$, then the particular Integral,
$\begin{align} \mbox{P.I.}= &\; \dfrac{1}{F(D)} \cdot e^{mx}\\ = &\; \dfrac{e^{mx}}{F(m)}, \text{ if } F(m)\neq 0 \\ = &\; x^r\cdot \dfrac{1}{F^r(D)}\cdot e^{mx}\\ = &\; x^r\cdot \dfrac{e^{mx}}{F^r(m)}, \text{ if } F(m)=F'(m)=F''(m)=\dots=F^{r-1}(m)=0 \text{ but } F^r(m)\neq 0 \end{align}$
For case $F(m)\neq 0$, we can easily prove the result, like
$F(D)e^{mx}=(D^n+P_1D^{n-1}+P_2D^{n-2}+\cdots++P_{n-1}D+P_n)e^{mx}\\
= (m^n+P_1m^{n-1}+P_2m^{n-2}+\cdots++P_{n-1}m+P_n)e^{mx}\\
= F(m)e^{mx}$
How can I prove the result for the case $F(m)=0$?
The described method only works under the condition that the coefficients $P_i$ are scalar constants, not otherwise functions of $x$.
Let $F$ as polynomial have a root of multiplicity $r$ at $m$ ($r=0$ means no root, the argument works still with $F^{(0)}=F$). Then the polynomial factors as $F(s)=(s-m)^rG(s)$ with $G(m)\ne 0$. Then confirm $$r!G(m)=F^{(r)}(m).$$
Next confirm that $$ G(D)e^{mx}=G(m)e^{mx} $$ and that $$ (D-m)(e^{mx}u(x))=e^{mx}u'(x)\implies(D-m)^r(e^{mx}u(x))=e^{mx}u^{(r)}(x) $$ so that in combination $$ F(D)(e^{mx}x^r)=G(D)(e^{m}r!)=r!G(m)e^{mx}=F^{(r)}(m)e^{mx}. $$ From that the given formula follows.