We start by letting yp = ax+b, as suggested, and finding the derivative yp' = a. Substituing into ODE (by way of matching coefficients) gives a pair of simulataneous (algebraic) equations:
(1) 2a=5b
(2) -5a=10
which can be solved to give (a,b)=(-2,-4/5). Then yp=-2x-4/5.
We now find the characteristic solution to the homogeneous ODE, 2y'+5y=0. By rearranging and integrating we find that
2ln|y| = 5x+C
which we rearrange to find yc = Aexp(5x/2). Then the general solution, given by y(gs)=yc+yp, takes the form
y=Aexp(5x/2)-2x-4/5,
and we are done.