To solve this problem, we need to determine the value of x, which represents the number of planks used for each hallway.
Let's break down the information given:
Planks used in Andrew's bedroom: 8 + 3 (replaced planks) = 11 planks
Planks used in Andrew's living room: 20 planks
Planks used in Andrew's kitchen: 11 planks
Planks used in the guest bedroom: 11 - 2 = 9 planks
Planks used in each hallway: x planks (we need to find the value of x)
Total number of planks used: 11 + 20 + 11 + 9 + 2x = 65 - 6 (leftover planks) = 59
We can set up the equation as follows:
11 + 20 + 11 + 9 + 2x = 59
Let's simplify and solve for x:
51 + 2x = 59
To isolate x, we subtract 51 from both sides of the equation:
51 - 51 + 2x = 59 - 51
2x = 8
To solve for x, we divide both sides of the equation by 2:
x = 8 / 2
x = 4
The value of x is 4.
#### 4
The answer is: 4
Below is a math problem. Provide a detailed, step-by-step solution.

### Problem:
Andrew installed hardwood flooring in his house. His bedroom took eight wooden planks, his living room took twenty planks, and his kitchen took eleven planks. The guest bedroom took two fewer planks than Andrew’s bedroom, and each of his two hallways took x planks. He accidentally ruined three planks in each bedroom by dragging furniture over them and had to replace them. He ended up with six leftover planks at the end. Andrew bought 65 wooden planks to start with.

### Answer:
