4. As shown in the figure, in rectangle $A B C D$, $A B=\frac{2}{5} B C, D E$ $=B G, \angle B E C=$ $\angle D G A=90^{\circ}$, the area of rectangle $E F G H$ is $S$. Then the area of rectangle $A B C D$ is $\qquad$ .
4. Answer: $\frac{25 S}{4}$.

Let $A B=a, B C=b, B G=D E=x, G F=m, G H=$ $n$. According to the geometric mean theorem in right triangles, we have
$$
x^{2}=n \cdot A G \text{ (in } \operatorname{Rt} \triangle A B G \text{)}
$$

and $(b-x)^{2}=m \cdot G D$ (in Rt $\triangle D C G$).
Multiplying the two equations, we get $x^{2}(b-x)^{2}=m n \cdot A G \cdot G D$.
Since $x(b-x)=a^{2}, m n=S, A G \cdot G D=2 S_{\triangle A G D}=$ $S_{\text {rectangle } A B C D}=a b$, substituting into (1), we get $a^{4}=S \cdot a b$. Therefore, $a^{3}=S b$. Given $a=\frac{2}{5} b$.
Thus, $\left(\frac{2}{5} b\right)^{3}=S b, b^{2}=\frac{125}{8} S$.
$S_{A B C D}=a b=\frac{2}{5} b \cdot b=\frac{25}{4} S$.