Official solution
Slope of the line y = x is 1.
\[ \therefore \] The shortest distance between line y = x and
parabola y2 = x -- 2 is the distance between line y = x and
tangent of parabola having slope 1.
Slope of tangent at point P on the parabola y2 = x -- 2 is,
2y\[{{dy} \over {dx}}\] = 1
\[ \Rightarrow \] \[{{dy} \over {dx}}\] = \[{1 \over {2y}}\] = slope
\[ \therefore \] \[{1 \over {2y}}\] = 1
\[ \Rightarrow \] y = \[{1 \over 2}\]
\[ \therefore \] x coordinate of point P is,
\[{1 \over 4}\] = x -- 2
\[ \Rightarrow \] x = \[{9 \over 4}\]
Shortest distance = length of perpendicular from P on line x -- y = 0
= \[{{\left| {{9 \over 4} - {1 \over 2}} \right|} \over {\sqrt {{1^2} + {1^2}} }}\] = \[{7 \over {4\sqrt 2 }}\]