Draw a basic diagram of two buildings, on of height , and one of height , then you can draw on the two lines of depression, complete with their angles of depression.
Using the alternate angles rule, you then have two right angles triangles. Both of these have the same base - (the width of the square).
Using trigonometry, you end up with the two equations:
and where x is the width of the square.
If we rearrange this to make h the subject, we get the following:
Equating these two eliminates h, and gives you the following:
You should be able to solve this by rearranging and taking out the common factor of x, giving you the width of the square.
Hopefully this wasn't too confusing, I will try and do a diagram to help explain the triangles that we found.