Imagine you lay the 9 and 6 logs side by side. The 6 is 3 feet short of the 9.
This rules out two as it is 1 foot short.
3 is also ruled out as there would be no dimension to the flower bed - it would be impossible to make a triangle.
Now do the reverse - use on of the remaining logs to test if they would work.
Try 15; 9 + 6 = 15 but we're looking to make a larger number
9 + 6 = 15 > 13 feet
The only log it can be is C 13 feet.