$\hskip 1in$ 
In the above, the base and height of the larger right triangle are $A$ and $B$ respectively, and the base and height of the inside, smaller triangle is $a$ and $b$ respectively. The two triangles are similar, which is a term from geometry meaning the ratios between the sides of one triangle are equal to the ratios between the sides of the other triangle. That is, in the above, we have that
$\frac{a}{b}=\frac{A}{B}.$
(Equivalently, the inner triangle is the bigger one scaled down in size.) Hence we have:
$\hskip 1in$
$\huge\displaystyle \frac{3}{4}=\frac{a}{4-x_i^*}$
Keep in mind we've approximated the triangle by covering it with thin rectangular strips, and intend to calculate the hydrostatic force associated to each strip and then add them up. As we make the strips smaller and smaller our calculation will be a Riemann sum for an integral, and hence this integral will be our desired answer. In order to calculate the force for a strip, we first denote its dimensions as $\Delta x\times 2a$. Note that $a$ is not really a constant: it varies with choice $x_i^*$. In order to do the Riemann sum though we need to write the hydrostatic force (of each strip) purely in terms of $x_i^*$, which means we need to solve for $a$ in terms of $x_i^*$, and similarity is what allows us to do that.