Let's denote $A(X)$ the area of the polygon $X$. Let $S$,$R$ be rectangles inside a triangle $T$.
Find the maximum value of: $$\frac{A(R)+A(S)}{A(T)}$$

My try
The only property i know (from a problem that i solved in the past) is that the maximum area of a rectangle inscribed in a triangle is $1/2$ the area of the triangle, but actually i don't know how to use it here.
Any hints?
The ratio will be maintained under affine transformations, so we can solve the problem for our favorite triangle. I will use the one with vertices $(0,0),(1,0),(0,1)$. Let $R$ have height $h$. The area of the triangle above $R$ is $\frac 12(1-h)^2$, so the area of $S$ is half that or $\frac 14(1-h)^2$. The area of $R$ is $h(1-h)$, so the area of $R+S$ is $A(R)+A(S)=h-h^2+\frac 14(1-h)^2$. Taking the derivative and setting to $0$ we have $$1-2h-\frac 12(1-h)=0\\ \frac 12-\frac 32h=0\\ h=\frac 13\\ A(R)+A(S)=\frac 13\cdot \frac 23+\frac 14(1-\frac 13)^2=\frac 13\\ \frac {A(R)+A(S)}{A(T)}=\dfrac {\frac 13}{\frac 12}=\frac 23$$