The diagram is composed of one large right triangle and inside it it's divided into 2 small right triangles. Since these triangles all have the same shape but not the same size, they are similar triangles. Using similar triangles, create a proportion of side lengths. A proportion is an equation with equal ratios from the large triangle to a small. Notice the large triangle has a hypotenuse of 6+7 = 13 and a leg of x. The small triangle has a hypotenuse of x and a leg of 7.
To solve for x, cross multiply the numerator with the denominator.