Using more triangles and fewer numbers
In the diagram below, a line and a radius have been drawn, where the line joins the centre of the semicircle to the top corner or the triangle, and the radius touches the hypotenuse of the triangle.
The radius is perpendicular to the tangent, so the angle shown is a right angle. The two triangles which have vertices in the top corner of the large triangle are congruent, so the hypotenuse is split into two pieces of length $2$ and $3$.
The triangle in the bottom corner, with sides $2$, $r$ and $r+x$, is similar to the large triangle, because they share the bottom right angle and both also have a right angle.
So $\dfrac{2}{4}=\dfrac{r+x}{5}=\dfrac{r}{3}\Rightarrow\dfrac{1}{2}=\dfrac{r+x}{5}=\dfrac{r}{3}$
So $r+x=2.5$ and $r=1.4$, so $x=1$.
Using fewer triangles and more algebra
In the diagram below, a radius which touches the hypotenuse has been added to the semicircle. The radius is perpendicular to the tangent, so the angle shown is a right angle. The smaller triangle formed is similar to the large triangle, because they share the bottom right angle and both also have a right angle.
So $\dfrac{r}{r+x}=\dfrac{3}{5}$, and additionally $2r+x=4$.
From $\dfrac{r}{r+x}=\dfrac{3}{5}$, $5r=3r+3x\Rightarrow2r=3x$.
Substituting this into the other equation, $3x+x=4\Rightarrow4x=4\Rightarrow x=1$.