You can use variation of parameters in both cases.
For the first equation, you have:
$$\frac{dC}{dt}+bC=a \tag{1}$$
The homogeneous form (when $a=0$ in this case) will be:
$$\frac{dC}{dt}=-bC \tag{2}$$
Which can be evaluated to give:
$$\ln|C|=-bt+k$$
$$C(t)=Ke^{-bt} \tag{3}$$
Equation $(3)$ is the solution to your homogeneous equation.
Now, just let $K$ vary in terms of $t$:
$$C(t)=K(t)e^{-bt} \tag{4}$$
And differentiate this:
$$C'(t)=-b K(t)e^{-bt}+K'(t)e^{-bt}$$
Now, you can substitute this into your original ODE on $(1)$:
$$-b K(t)e^{-bt}+K'(t)e^{-bt}+bK(t)e^{-bt}=a$$
This should cancel out nicely, and you should be able to solve for $K(t)$, which can be substituted into $(4)$, giving the general solution to the full differential equation.
You can apply this same method to your other differential equation $\frac{dy}{dx}-\frac{y}{x}=1$ by letting $1$ equal $0$ to find a solution to your homogeneous equation.