I've found this to be difficult to solve:
$$ \frac{d^2 x }{dt^2} + (a x + b) \frac{dx}{dt} = 0 $$
I've done some reading, and I guess I could write this as:
$$ \frac{d^2 x }{dt^2} + b \frac{dx}{dt} + ax \frac{dx}{dt} = 0 $$
If I then treat $v(x) = \frac{dx}{dt}$ as an independent variable, I would get:
$$ \frac{dv}{dt} + bv + axv = 0 $$
This is sort of like a nonhomogenous equation. If I take the homogenous solution, I would get:
$$ v(t) = A e^{-bt}$$
I think.... I'm not sure where to go from here though.
We know the solution you have is wrong by putting it back in $$ v' = -bv $$ so we have in your original equation $$ -bv + bv + axv = axv = 0 $$ this is in general not true.
Your issue was not converting the $x$ in terms of $v$.
To give a hint. $$ x'' = \frac{dx}{dt}\frac{dv}{dx} $$ this leads to $$ \frac{dx}{dt}\frac{dv}{dx} + b\frac{dx}{dt} + ax\frac{dx}{dt} = \left(\frac{dv}{dx} + b + ax\right)\frac{dx}{dt} = 0 $$ In general $x' \neq 0$, so we can try to solve $$ \frac{dv}{dx} + b + ax = 0 $$ This is a first order ode with the correct variables to solve nicely.