We know that 3, 4, 5 is a Pythagorean Triple, so we can draw a dashed/dotted/faint line at the bottom, creating a triangle with the 3 and 4.
You can then create a rectangle using the 4 on the very left and the segment with length 5 that we just created. So now we have a portion of x, which is 5. Because we drew a rectangle and there are two 4's, we can use the Pythagorean Theorem again and find that the last portion of x is 3. So x is equal to 8.
Correct me if I'm wrong