The volume of the box is calculated by multiplying its height, width, and length: 8 * 10 * 12 = 960 cubic inches.
The volume of the building block is calculated by multiplying its height, width, and length: 3 * x * 4 = 12x cubic inches.
To find out how many building blocks can fit into the box, we need to divide the volume of the box by the volume of one building block: 960 / (12x) = 80 / x.
We are given that the number of building blocks that can fit into the box is 40, so we can write: 80 / x = 40.
Solving for x, we get: x = 2.
The value of x is 2.
#### 2
The answer is: 2
Below is a math problem. Provide a detailed, step-by-step solution.

### Problem:
A box is 8 inches in height, 10 inches in width, and 12 inches in length. A wooden building block is 3 inches in height, x inches in width, and 4 inches in length. How many building blocks can fit into the box?
If we know the answer to the above question is 40, what is the value of unknown variable x?

### Answer:
