The ratio of the perimeters is 4/9, so the same applies to the side lengths
AB/HE = (x-2)/(2x)
AB/HE = 4/9
So,
(x-2)/(2x) = 4/9
9(x-2) = 2x*4 ... cross multiply
9x-18 = 8x
9x-8x = 18
x = 18
If x = 18, then
AB = x-2 = 18-2 = 16 units long
HE = 2x = 2*x = 2*18 = 36 units long