Use the formula for the area of a rectangle, and substitute the information you know.
.. A = L*W
.. 24 ft² = L*(2/3)L
.. 36 ft² = L² . . . . . . . multiply by 3/2
.. 6 ft = L . . . . . . . . . . take the square root
.. W = (2/3)L = (2/3)(6 ft) = 4 ft.
The doghouse is 4 ft wide by 6 ft long.