you want to minimize the distance between \(\displaystyle \L (x, x^2+1)\) and \(\displaystyle \L (3,1)\).
remember the distance formula?
\(\displaystyle \L d = \sqrt{(x-3)^2 + [(x^2+1)-1]^2}\)
to make it a bit easier, if you minimize \(\displaystyle \L d^2\), you also minimize \(\displaystyle \L d\).