It is a linear non-homogeneous equation.
Solve for the integrating factor.
y' +2y =1
first find the characteristic roots
y'+2y=0
lambda=l
l^2+2=0
l=-2
l=+-sqrt(2)i
y=e^sqrt(2)i+e^-sqrt(2)i
expand with eulers formula get sin and cosine = yg, then
find particular solution
y=A
y'=0
plug into the question
2A=1
A=1/2
Now yp=1/2
y=yg+yp
Cheers