4

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