The first thing we need to take note of is that where t is in hours

2nd we need to construct a cost function that depends on velocity.

Dimentional analysis will be helpful

but we know what t is in terms of v so we get and reducing all of our units we get

taking the derivative we get

setting this equal to zero we get