See the following image :
AB = 10 BC = 16
Since FG is parallel to AB.....then triangle GFC is similar to triangle ABC
Therefore....
AB/BC = GF/FC
10/16 = GF/ FC
5/8 = GF/FC
8/5 = FC / GF
Let GF = the side of the square = s
So....
(8/5)s = FC
Draw altitude AH
Triangle BHA is a right triangle
sin angle B = 8/10 = 4/5
But triangle BEF is also a right triangle with hypotenuse BF
Therefore sin angle B = EF/ BF = s/BF
4/5 = s/BF
5/4 = BF/s
(5/4)s =BF
But BF + BC = 16
Therefore
(8/5)s + (5/4)s =16
[( 32 + 25) / 20 ] s = 16
(57/20)s =16
s = (20)(16)/57 = 320 / 57