4.2. The line $p: y=-x+1$ and two points $\mathrm{A}(-1,5)$ and $\mathrm{B}(0,4)$ are given. Determine the point $P$ on the line $p$ for which the sum of the lengths of the segments $|A P|+|P B|$ is minimal.