Let length = l and width = w

Then perimeter = 2l + 2w and area = lw

So 2l + 2w = 34 and lw = 60

l = 60/w

2(60/w) + 2w = 34

120/w + 2w = 34

120 + 2w^2 = 34w

2w^2 - 34w + 120 = 0

w^2 - 17w + 60 = 0

(w - 12)(w - 5) =0

w = 12 or w = 5

If w = 5 then l = 60/w = 60/5 = 12

If w = 12 then l = 60/w = 60/12 = 5

So longest side is 12