If you walked up the hill (from the bottom to the top) you would be a distance above the bottom. Since the hill slopes at a 45 degrees angle you are also that horizontal distance from the bottom. (Its a 1:1 slope)

Call that vertical & horizontal distance 1.

If you walk along the top of the hill (parallel with the bottom) for a distance x.

The HORIZONTAL distance back to the starting point would be .

You are looking for the horizontal distance, in this case, to be 2.

You have a triangle. Base (adjacent side) of length 1, and the hypotensue of length 2.

The angle you require (from the north direction straight up the hill):