Using the Pythagorean theorem we can find the distance from the swimming pool to the courthouse:
Swimming pool to courthouse:
Distance = √(3^2 + 4^2)
Distance = √(9+16)
Distance = √25
Distance = 5 kilometers
Now total the distance the bird flew:
Courthouse to Library is given as 3 kilometers.
Library to swimming pool is given as 4 kilometers
Swimming pool to courthouse we calculated as 5 kilometers.
Total distance = 3 + 4 + 5 = 12 kilometers.