I have been trying to solve this problem for a while to no avail.
Suppose we have $$ m\frac{dv}{dt}=mg-bv\enspace,\qquad v(0)=v_0 $$ (Where, of course, $m$ is mass, $g$ and $b$ are constants.)
We derive the following expressions for velocity and displacement in terms of time (assuming $x(0)=0):$
$$ v(t)=\frac{mg}{b}+\left(v_0-\frac{mg}{b}\right)e^{-bt/m}\\ x(t)=\frac{mg}{b}t+\frac{m}{b}\left(v_0-\frac{mg}{b}\right)\left(1-e^{-bt/m}\right) $$
Now, going from here, we are supposed to eliminate time, and relate velocity and displacement without $t$.
The hint given is that, if we let $v(x)=v(x(t))$ be the velocity with regard to displacement, $$ \frac{dv}{dt}=\frac{dv}{dx}\frac{dx}{dt}=\frac{dv}{dx}\cdot v $$
Stepping a tiny bit further, I found that $V$ can be expressed as a derivative such that $$ \frac{dv}{dt}=\frac{dv}{dx}\frac{d}{dv}\left[\frac{1}{2}v^2\right]=\frac{d}{dx}\left[\frac{1}{2}v^2\right] $$ Plugging the force equation with which we started, that reads as $$ \frac{dv}{dt}=g-\frac{b}{m}v=\frac{d}{dx}\left[\frac{1}{2}v^2\right] $$ So $$ g-\frac{b}{m}\frac{d}{dx}\left[\frac{1}{2}v^2\right]=\frac{d}{dx}\left[\frac{1}{2}v^2\right]\quad\Leftrightarrow $$ $$ d\left[\frac{1}{2}v^2\right]=\frac{mg}{b+m}dx\quad\Leftrightarrow\quad\int d\left[\frac{1}{2}v^2\right]=\frac{mg}{b+m}\int dx \quad\Leftrightarrow $$ $$ |v|=\sqrt{\frac{2mg}{b+m}x}+c_1\quad\Leftrightarrow\quad x=\frac{1}{2}\frac{b+m}{mg}v^2+c_2 $$
EDIT: O.k., so I saw that substituting $\frac{1}{2}v^2$ wasn't necessary, and using $mg=bv_0$, I get $$ \frac{b}{m}\left(v_0-v\right)=\frac{dv}{dx}v $$ which is separable to $$ \frac{b}{m}dx=\frac{vdv}{v_0-v} $$ Solving for x, I get $$ x = -\frac{m}{b}\left(v_0log\left(v-v_0\right)+v\right)-\frac{m}{b}v_0 $$ Sadly, I still can't connect the dots that would lead to the solution the book gives, which is $$ e^{bv}|bv-mg|^{mg}=e^{v_0b}|bv_0-mg|^{mg}e^{-b^2x/m} $$