ABC is a right triangle with AC the hypotenuse = 5
Its area = (1/2) product of the leg lenghts = (1/2) (3 * 4) = 6
Since its base is 5.....its altitude is
6 = (1/2) AC * altitude
12 = 5 * altitude
altitude = 12/5
And triangle WBZ is similar to triangle ABC
So
altitude of WBZ / base of WBZ = altitude of ABC / base of ABC
(12/5 - S ] / S = (12/5) / 5 where S = the side of the square
(12/5 - S) * 5 = (12/5)S
12 - 5S = (12/5)S
12 = 5S + (12/5)S
12 = S [ 5 + 12/5 ]
12 = S [ 37/5 ]
!2 [ 5/37] = S
60/37 = S