The equation of the line from O to C is
\[y=x\]
anf the equation of the line BH is \[y= - \frac{h}{b} x + h\]
. From these we can write \[c=- \frac{h}{b}c + h\]
,br>
Hence \[c(1+ \frac{h}{b})=h \rightarrow c= \frac{hb}{h+b}\]
.The square has side
\[ \frac{hb}{h+b}\]
.