We are essentially looking for the LCM (least common multiple) of the lengths 25, 40 and 50 cm.
Since 50 is already a common multiple of 25, since 2*25=50, we only need to look for the LCM of 40 and 50.
One simple way to find the LCM is to factor both numbers,
40=2^3*5
50=2*5^2
and look for the product of the higher power of each factor, which in this case is 2^3*5^2=8*25=200.
Another way, looks round about in this case, is to look for the HCF, which is the product of the lowest power of each factor, which in this case is 2*5=10.
The LCM is then the product of the two numbers divided by the HCF, or
LCM=50*40/10=200, again.