The area for a square is length times width (A = l * w). However, since it's a square, all the sides will be equal in length, thus, area can be rewritten as A = s^2, with s being the length of a side. Now plug in the given value into the equation:
9 meters = s^2
Take the square root of both sides, and you will get s = 3, which means the length of one side of the carpet is 3 meters long (which also happens to be the length of all the sides).