In Rt△ACE, from Pythagorean theorem, Ce2 = AE2+AC2 = X2+152;
Similarly, DE2 = (25-x) 2+102;
If CE=DE, x2+152 = (25-x) 2+102;
Solution: x =10 km;
In other words, the library E should be built at a distance of 10km, so that the distance between it and the two schools is equal.