You have a larger right triangle (vertices: football field, park, home) with an altitude drawn to the hypotenuse. The altitude creates two more triangles. The two new triangles are also right triangles, and all three triangles are similar.
Part a.
Let x = distance from park to library
9/x = x/12
x^2 = 9 * 12
x^2 = 108
x = sqrt(108)
x = sqrt(36 * 3)
x = 6sqrt(3)
Answer to part a. 6sqrt(3)
Part b.
Once you know x, use the value of x and 12 as the lengths of legs, and you are looking for the distance from the park to the football field which is the hypotenuse.
Let y = the length of the hypotenuse which is the distance from the park to the football field.
(6sqrt(3))^2 + 12^2 = y^2
108 + 144 = y^2
y^2 = 252
y = sqrt(252)
y = sqrt(4 * 9 * 7)
y = 6sqrt(7)
Answer to part b: 6sqrt(7)