im having trouble solving this problem in my review packet:

An 8 foot high fence is located 1 foot from a building. determine the length of the shortest ladder with its foot on the ground which can be leaned against the building and touch the top of the fence.