As we know that,
T=2πgl
Time period is directly proportional to the square root of the length of the pendulum.
In the case when,
T1 : T2 = 2 : 1 [Equation 1]
we know that,
T1 : T2 = l1:l2 [Equation 2]
So we get,
l1:l2=2:1⇒l2l1=12
Squaring both sides we get,
l2l1=1222⇒l2l1=14⇒l1:l2=4:1
Hence, ratio of lengths = 4 : 1