It appears that you correctly knew to use cosine to set up an equation, but you made a mistake in figuring the role of the 2 foot peg. If you draw a horizontal line from the top of the peg to the pole, you will form a right triangle. The length of the vertical leg of this triangle is feet. This is the side adjacent to the angle. The length of the rope is the hypotenuse of this right triangle.