Rearrange the equation, let A = k/m so that you have:
dv/(g - Av^2 ) = dt
And integrate both sides:
Int( 1/ ( g - Av^2 ) )dv = t + C
I'm assuming the integration on the left is giving you trouble? Use partial fraction decomposition to rewrite the integrand:
1/(g-Av^2) = 1/[(p+qv)(p-qv)] = [1/(p+qv) + 1/(p-qv)] / (2p)
where p = sqrt(g) and q = sqrt(A), and factoring was done as a difference of squares assuming that k is positive (since g and m better be positive lol)
Now you don't have that square in the denominator, you should be able to integrate each term. I haven't worked out all the details but I'm pretty sure you'll be able to isolate for v to get an explicit formula, though it might be a bit annoying algebraically