Remember this post: http://wulidancing.blogspot.com/2008/07/double-pendulum.html?
Well, it turns out that you don't really need any high-level mathematics for this question, and I'm just wondering how come I didn't figure it out at that time, haha. So here's the whole set up again:
It'd be useful to see that the equilibrium position should have zero gravitational potential energy:
The trick to solving this question is to lift each pendulum up one after the other; so let's give the first pendulum a push and see what happens to the potential energy:
Notice that both pendulum bobs are raised by the same length, which explains the coefficient of '2'. Now let's give the lower pendulum another push and let's see what happens:
Notice that we've just added another term to the potential energy, and this time the coefficient is '1' because only one bob is raised.
Quite easy right? Haha.