Problem Link: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=1228
given the side of the regular hexagon. We have to find the radius of the circles in the above four cases in the picture.
can't find the 2nd and 4th case...
1st case: is six equlatiral triangle and the area is sqrt(3)/4*side^2 = 1/2*side*height. so height =sqrt(3)/2*side
3rd case : is 2*height =sqrt(3)/2*side so height = (sqrt(3)/2*side)/2
here height is the radius. now I need to find the radius of circle in the 2nd and fourth case and in all case circle have the same radius.

Denote the side of the hexagon as $a$:
Case 2:
The distance $H$ between parallel sides of the hexagon is $a\sqrt3$. On the other side (look at the picture):
$$H=a\sqrt3=r+(2r)\frac{\sqrt3}{2}+r=r(2+\sqrt3)$$
So the radius of the circle is:
$$r=\frac{a\sqrt3}{2+\sqrt3}=a(2\sqrt3-3)\approx0.464a$$
Case 4:
First equation:
$$PQ=PB+AB\cos\alpha+AD\cos\alpha+DQ$$
$$2a=2\frac{2r\sqrt3}{3}+2(2r)\cos\alpha$$
$$a=\frac{2r\sqrt3}{3}+2r\cos\alpha$$
$$a-\frac{2r\sqrt3}{3}=2r\cos\alpha\tag{1}$$
Second equation:
$$EF=EA+AD\sin\alpha+DC\sin\alpha+CF$$
$$a\sqrt3=2r+2(2r)\sin\alpha$$
$$\frac{a\sqrt3}{2}=r+2r\sin\alpha$$
$$\frac{a\sqrt3}{2}-r=2r\sin\alpha\tag{2}$$
Square (1) and (2) and add to eliminate $\alpha$:
$$(a-\frac{2r\sqrt3}{3})^2+(\frac{a\sqrt3}{2}-r)^2=4r^2$$
This is a simple quadratic equation with two solutions but only one of them is positive:
$$r=a\frac{6\sqrt7-7\sqrt3}{10}\approx0.375a$$