Let x = the distance down shore that you paddle. The total distance you paddle is (x2+4002)1/2. Once on shore, the distance you walk is 1000 - x. distance = rate*time so time = distance/rate:
time = (x2+4002)1/2/(2 k/h) + (1000-x)/(3 k/h)
Take the derivative of time wrt x, set it to zero, then solve for x.