A rectangle inscribed in a triangle has its base coinciding with the base b of the triangle. If the altitude of the triangle is h, and the altitude x of the rectangle is half the base of the rectangle, then:
Draw the triangle, and note that the small triangle formed by taking away the rectangle and the two small portions left is similar to the big triangle, so the proportions of the heights is equal to the proportions of the sides. In particular, we get
2xb=h−xh
⇒2hx=bh−bx
⇒x(2h+b)=bh
⇒x=bh2h+b