4

The area of the rectangle is $6 \times 8 = 48$ square units, so the unshaded area is $\frac{1}{4} \times 48 = 12$ square units. Therefore $(\frac{1}{2} \times x \times 2) + (\frac{1}{2} \times (6-x) \times 8) = 12$, that is, $x + 24 - 4 x = 12$, so $x=4$.

*This problem is taken from the UKMT Mathematical Challenges.*