need help with this problem its really complicated for me

You can write a proportion because the two triangles are similar
[tex]\frac{x}{x-2}[/tex] = [tex]\frac{x + x + 5}{x + 1 + x - 2}[/tex] (the second fraction is longer because I added the full lengths of the larger triangle) cross multiply to get (x)(x + 1 + x - 2) = (x - 2)(x + x + 5)
which simplifies to (x)(2x - 1) = (x - 2)(2x + 5)
then 2x² - x = 2x² + 5x -4x - 10
then 2x² - x = 2x² + x - 10
then 2x² = 2x² + 2x - 10
subtract 2x² from both sides to get 0 = 2x - 10
add 10 to both sides to get 10 = 2x
divide both sides by 2 to get 5 = x