The distance from the home to school and home to library form the legs of a right triangle so that the longest distance from the school to the library is the hypotenuse of the right triangle.

We can find the length of that hypotenuse using the Pythagorean Theorem: length = sqrt(2.6^2 + 0.8^2) = 2.72 miles.