Answer
The general solution to the reduced problem $u' = -au$ is : $u(t) = ce^{-at}$.
If $a \neq 0$, the general solution to the problem $y' = -ay + b$ is : $$y(t) = u(t) + k = u(t) + b/a = ce^{-at} + b/a.$$
If $a = 0$, the general solution to the problem $y' = b$ is : $y(t) = bt + C$.
Work Step by Step
We want to solve $y' = -ay + b$, where $y' = dy/dt$, $a$, $b$ are constants.
We first find a solution to the reduced problem $u' = -au$.
If $u \neq 0$, we can write $\frac{u'}{u} = -a$ and notice that $\frac{u'}{u} = (ln(\lvert u \rvert))' = -a$.
By integrating both sides of the equality relatively to $t$, we get $ln(\lvert u \rvert) = -at + C$, where $C$ is the integration constant.
By applying the exponential function to both sides of the equality, we get $\lvert u \rvert = e^Ce^{-at}$.
Since the exponential function $e^x$ is always positive, either $u$ is always positive or $u$ is always negative, which gives us the general solution $u = u(t) = ce^{-at}$.
Now, we suppose that the solution to $y' = -ay + b$ is of the form $y(t) = u(t) + k = ce^{-at} + k$, where $k$ is a constant.
By pluging $y$ and $y'$ into the equation, we get : $$y' = -ay + b \iff -ace^{-at} = -a(ce^{-at} + k) +b$$ or equivalently $$0 = -ak + b.$$
If $a \neq 0$, we have $k = b/a$ and thus $y = y(t) = ce^{-at} + b/a$ is the general solution to the equation $y' = -ay + b$.
If $a = 0$, the equation becomes $y' = b$, which can be solved by integrating both sides of the equality relatively to $t$, so that we get $y = y(t) = bt + C$.