[tex]x^2=x+2\implies x^2-x-2=(x-2)(x+1)=0\implies x=-1,x=2[/tex]
are the intersection points of the line and parabola. [tex]x^2[/tex] is convex, which guarantees that [tex]x+2\ge x^2[/tex] over this interval. This means the vertical distance between the two functions is
[tex]d(x)=|(x+2)-x^2|=2+x-x^2[/tex]
Differentiating, we have
[tex]d'(x)=1-2x[/tex]
which has one critical point at
[tex]1-2x=0\implies x=\dfrac12[/tex]
At this point, we have
[tex]d\left(\dfrac12\right)=\dfrac94[/tex]
as the maximum vertical distance.