Let the length of the garden be x and the width of the garden be y.
x*y = 108
2x + 2y = 48 giving x + y = 24 or y = 24 - x
substitute the second equation into the first,
x*(24-x) = 108
24x - x^2 = 108
x^2 - 24x + 108 = 0
(x-18)(x-6) = 0
So, x = 18 or x = 6.
But if x = 18, y = 6 and if x = 6, y = 18 so both solutions are actually the same with just the width and length swapped. So, your garden is 18 meters by 6 meters.