Let's draw a picture of the problem:
From the picture above, we can see that the difference (x) between the second and third position is
which gives
How many degrees forward must the swing go to return to its starting position? Answer: 45 degrees forward