Say the squares have side lengths 4x and 3x, and so have areas 16x2 and 9x2. Say the square intersection has side length n, with n<3x.
If we simply add the areas of the squares, 16x2+9x2, we double-count the area of the intersection. To correct the double-count, subtract off the intersection area once. So the total area is 16x2+9x2-n2=5000.
25x2-n2=5000
(5x)2-n2=5000
We need to find x and n, knowing that they're integers. One observation:
n2=5(5x2)-5(1000)
n is a multiple of 5. So if we rewrite n=5m and substitute, we get
(5x)2-(5m)2=5000
25x2-25m2=5000
Divide by 25 to get
x2-m2=200
Factor:
(x+m)(x-m)=200
Now, list all of the factor pairs of 200, and see if we can find a solution. Note that x+m must be positive, so we only care about positive factors. The possible values of x+m and x-m are:
1 and 200
2 and 100
4 and 50
5 and 40
8 and 25
10 and 20
Now to rule some of these out. If we add the factors, we get x+m+x-m=2x, an even number. That rules out (1, 200), (5, 40), and (8, 25), since those sums are odd. Let's check the other three. Note that x-m<x+m, since m is positive, so we always set x-m to be the smaller factor.
In each case, we add the two equations to get 2x=(the sum of the factors), then divide by 2 to get x. So we have
x=51, m=49
x=27, m=23
x=15, m=5
Now go back and find n in each case. Remember that n=5m, the side length of the intersection square:
x=51, n=245
x=27, n=115
x=15, n=25
But remember also that we need n<3x, which fails in the first two cases. So we rule those out, and the only remaining option is x=15.
Then the side length the largest square is 4x=60.
Jemmimah C.
Thank you very much!09/12/22