Use the first part of the question to do the second part.

If you can separate the variables you can write the expression in the form
ó
õ
f(x) dx = ó
õ
f(v) dv
and integrate to find the solution.

Take care over signs, acceleration is towards the Earth and displacement and velocity are measured in the opposite direction.