Here is your answer
Since the line is parallel to one side of triangle, so by
Thales' theorem other two sides are divided in the same ratio.
So,
[tex]\huge\frac {5}{40}=\frac{3}{2x + 10}[/tex]
[tex]\huge => 5 (2x+10)= 3×40 [/tex]
[tex]\huge => 10x + 50= 120 [/tex]
[tex]\huge => 10x= 120-50=70 [/tex]
[tex]\huge => x=7 [/tex]
HOPE IT IS USEFUL