The escape velocity is the initial velocity necessary to "escape" to infinity. But you don't need to integrate twice. Just integrate once to get the formula for the velocity. The escape velocity is the smallest initial velocity such that the velocity is never 0 for any finite t.