2(8-x) = 16-2x (because there are 2 width lengths in the whole perimeter (circumference).
2x+24 - 16-2x =8 (the x's cancel each other out)
8/2 = 4 (because the length is in 2 parts so they are each 4)
The length of the garden is 4m
Hope this helps :)