Since the room is square-shaped, its area is equal to the length of one side squared. Therefore, the area of the room is:
Area = (side length)^2 = 9^2 = 81 square feet
To find out how much it will cost to buy enough carpet for the room, we need to multiply the area of the room by the cost per square foot of the carpet. So, the cost of the carpet would be:
Cost = Area x Cost per square foot = 81 x $5.82 = $471.42
Therefore, it will cost Danny $471.42 to buy enough carpet for the room.