If one of the lines is tangent (the one whose length equals 8) and the other line is secant (the one that goes from the that intersects the circle), then the square of the length of the tangent is equal to the product of the external secant segment and the total length of the secant, like this:
8²=4×(4+x)
From this equation we can solve for x like this:
64 = 4×4 + 4x
64 = 16 + 4x
64 - 16 = 4x
48 = 4x
12 = x
x = 12
Then, x equals 12