Question 886865
The first problem:


The two triangles being similar means that the ratio of corresponding sides is the same and that corresponding angles are congruent (meaning of equal measures).  Also, corresponding linear dimensions are equal.  You have this numeric situation.
{{{7/5=(x+4)/(x+1)}}}
and you can solve for x.


The second problem works the same way.
Heights 9 and 7; corresponding sides x-7 and x,
{{{9/7=(x-7)/x}}}
Solve for x.