The 25 W lamp has a higher resistence. Because P = V2/R ans hence Power is inversely proportional to the resistence.
So P= V2/R
if V is same for both
P∝1/R
Hence if the power is halved the resistence is doubled.
Thus, ratio of resistence of 50W lamp to 25 W lamp is 1:2