$$\dfrac { { d }^{ 2 }y }{ d{ x }^{ 2 } }
+3y=-2x.......(i)$$
This is second order non homogeneous differential equation.
Its solution is given as $$CF+PI$$
For $$CF$$ part
$$\dfrac { { d }^{ 2 }y }{ d{ x }^{ 2 } } +3y=0....(ii)\\ y={ { { c }_{
1 } }e }^{ mx }\\ \dfrac { dy }{ dx } ={ c }_{ 1 }m{ e }^{ mx }\\ \dfrac { { d
}^{ 2 }y }{ d{ x }^{ 2 } } ={ c }_{ 1 }{ m }^{ 2 }{ e }^{ mx }$$
Substituting in $$(ii)$$, we get
$${ m }^{ 2 }{ e }^{ mx }+3{ e }^{ mx }=0\\ { e }^{ mx }({ m }^{ 2 }+3)=0\\ { m
}^{ 2 }+3=0\\ \Rightarrow m=\sqrt { -3 } \\ m=i\sqrt { 3 } \\ y=c_{1}{ e }^{ i\sqrt
{ 3 } x }={ c }_{ 1 }(\cos { \sqrt { 3 } x } +i\sin { \sqrt { 3 } x } )\\ y={ c
}_{ 1 }\cos { \sqrt { 3 } x } +{ c }_{ 2 }\sin { \sqrt { 3 } x } \quad \quad $$
For $$PI$$ part
Let $$y=cx+d$$
$$\dfrac { dy }{ dx } =c\\ \dfrac { { d }^{ 2 }y }{ d{ x }^{ 2 } } =0$$
Substituting in $$(i)$$
$$0+3(cx+d)=-2x\\ 3cx+3d=-2x$$
Comparing both sides
$$c=-\dfrac { 2 }{ 3 } ,d=0$$
So solution for $$PI$$ part is
$$y=-\dfrac { 2 }{ 3 } x$$
General solution is $$CF+PI$$
$${ c }_{ 1 }\cos { \sqrt { 3 } x } +{ c }_{ 2 }\sin { \sqrt { 3 } x }
-\dfrac { 2 }{ 3 } x\quad $$