see the attached figure to better understand the problem
we know that AM=MD so triangle AMD is an isosceles right triangle therefore its height is half its width. Then AB = (1/2)AD----------Equation 1 Perimeter=2*[AB+AD]=34 in ---------> AB+AD=17-------> Equation 2
I substitute 1 in 2 (1/2)AD +AD = 17 (3/2)AD=17 AD=17*2/3----------> AD=34/3-------> 11 1/3 in AB=(1/2)AD--------> AB=(1/2)*34/3--------> AB=17/3-------> AB=5 2/3 in