I began this problem with 2 classmates, and solved it a little bit later. Out of sheer boredom, decided to make an animation on the solution!
This problem was taken from Haese Mathematics IB Math AA HL Book 2, Exercise 17G.1 problem 9 on page 460.