For shortest distance, slope of tangent on the curve will be equal to slope of line.
Now, first curve :y=x+lnx
Differentiating both sides w.r.t. x,
⇒y′=1+1x
At point P(h,k),y′=1+1h
⇒(dydx)c1=(dydx)c2
⇒1+1h=2
∴h=1, and(h,k) satisfies y=x+lnx
⇒k=1
∴h+k=2