Answer :
See the diagram enclosed. A square of largest size is possible only if you coincide two edges of triangle with the two edges of square.
Now area of triangle ABC = 1/2 *8 * 16 cm² = 64 cm²
Area of square = a²
area of triangle BDE = 1/2 (8-a) a = 4a - a²/2
area of triangle EFC = 1/2 (16 -a) a = 8a - a²/2
ΔABC = 64 = a² + 4a -a²/2 + 8a -a²/2 = 12 a
a = 16/3
Now area of triangle ABC = 1/2 *8 * 16 cm² = 64 cm²
Area of square = a²
area of triangle BDE = 1/2 (8-a) a = 4a - a²/2
area of triangle EFC = 1/2 (16 -a) a = 8a - a²/2
ΔABC = 64 = a² + 4a -a²/2 + 8a -a²/2 = 12 a
a = 16/3