1.
The side of the smaller square = 1 cm and the side of the larger square = 4 cm
Let the distance from the top right of the smaller square to the intersection of AB with the side of the larger square = x
So the small triangle formed above the smaller square has a hypotenuse of √[ 1 + x^2]
And the larger triangle formed at the "top" part of the larger square has legs of 4 and [ (4) - (1 + x)] = (3 -x) so the hypotenuse of this triangle is √ [ 4^2 + (3 - x)^2 ] =
√ [ 16 + 9 - 6x + x^2 ] = √ [ x^2 - 6x + 25 ]
And the triangles are similar such that
1 / √[ 1 + x^2] = 4 / √ [ x^2 - 6x + 25 ] cross-multiply
√ [ x^2 - 6x + 25 ] = 4 √[ 1 + x^2] square both sides
x^2 - 6x + 25 = 16 (x^2 + 1)
x^2 - 6x + 25 = 16x^2 + 16
15x^2 + 6x - 9 = 0
5x^2 + 2x - 3 = 0
(5x - 3) (x + 1) = 0
Setting each factor to 0 and solving for x produces x = 3/5 = .6 and x = -1
But x is a length so it can't be negative
So x = 3/5 cm = .6cm
So....the length of AB is
√[ 1 + (.6)^2] + √ [ (.6)^2 - 6(.6) + 25 ] =
√ [ 1.36] + √ [ 21.76 ] ≈ 5.8 cm