Is the tree inside the city or outside the city? I had assumed the person walking would see the tree through the gates; that is if the tree is inside the city.
Using the diagram attached.
Each tick mark represents a gate.
Let x be the length from the gate to the nearest vertex of the squared city wall.
The restriction for x is that it has to be greater than zero. Thus, x > 0.
Dimensions of the city is = 2x by 2x paces
AB = 20 paces
CD = 14 paces
DE = 1775 paces
BC = 2x
AD = AB + BC + CD = 2x + 20 + 14 = 2x + 34
BF = x
FG = BC + CD = 2x + 14
GE = DE - BF = 1775 - x
On the diagram there are 3 triangles:
, , and
Using the concept of proportionality (similar triangles), you can find x. Each triangle have identical angles which add up to 180 degrees, but different sides. Thus, you have three ways to solve for x.
Solving for x from each expression, you will obtain solutions of 125 and -142.
Obviously x cannot equal to -142 paces, because of the restriction placed on x. (x > 0)
Therefore, x = 125.
Finally, your dimensions of the city is:
2x by 2x = 2(125) by 2(125) = 250 paces by 250 paces