Explanation:
I assume the ? is the left leg of the left triangle.
the middle line (right leg of the smaller left triangle, and the left leg of the larger right triangle) bisects the top angle of the main large triangle (because the top angles left and right from the middle line are equal).
that means per the angle bisector theorem
5 / 4 = 10 / ?
5 = 10×4/? = 40/?
?×5 = 40
? = 40/5 = 8