Area = L * B = 2B * B = 2B^2
Yellow and Purple area = (2/5 + 1/3) * 2B^2 = (22/15)B^2
Pink area = (1/2) ( 2B^2 - 22/15 *B^2 ) = (4/15)B^2
So
Area - Painted Area = 240
2B^2 - (22/15 + (4/15))B^2 = 240
[4/15) B^2 = 240
B^2 = (240* 4 /15)
B^2 = 960 / 15
B^2 = 64
B = 8
2B = 16
Perimeter = 2 [ B + 2B ] = 2 [ 8 + 16 ] = 48 cm