Diagram: Let PC = multi-storeyed building, AB = 8 m tall building. Draw PQ horizontal from P. Angles of depression to top (B) and bottom (A) of AB are 30° and 45° respectively.
By alternate angles: ∠PBD = 30° and ∠PAC = 45°, where BD ∥ AC (horizontal distances).
Let PD = h m (height above B), so PC = PD + DC = h + 8.
Also, AC = BD (distance between buildings).
In right △PAC:
$$\tan 45° = \frac{PC}{AC} \Rightarrow 1 = \frac{PC}{AC} \Rightarrow AC = PC$$
In right △PBD:
$$\tan 30° = \frac{PD}{BD} \Rightarrow \frac{1}{\sqrt{3}} = \frac{h}{BD} \Rightarrow BD = h\sqrt{3}$$
Since AC = BD and PC = h + 8:
$$h + 8 = h\sqrt{3}$$
$$h(\sqrt{3}-1) = 8 \Rightarrow h = \frac{8}{\sqrt{3}-1} \times \frac{\sqrt{3}+1}{\sqrt{3}+1} = 4(\sqrt{3}+1) \text{ m}$$
Height of multi-storeyed building:
$$PC = 4(\sqrt{3}+1)+8 = 4\sqrt{3}+4+8 = 4(\sqrt{3}+3) \text{ m}$$
Distance between buildings:
$$AC = PC = 4(\sqrt{3}+3) \text{ m}$$
Source: Chapter 9 – Heights and Distances, Example 6
---