Height of the building $$AB=7\:m$$
Let height of the tower be $$PC$$ and the distance between the building and the tower be $$AC$$.
Angle of depression to top of building is $$\angle {QPB}=45^o$$
Angle of depression to bottom of building is $$\angle {QPA}=60^o$$
We have to find the height of the tower $$i.e., PC$$.
Draw $$BD$$ parallel to $$AC \: and\: PQ$$
Since $$PQ || BD, \angle{PBD}=\angle{QPB}\Rightarrow \angle{PBD}=45^o$$
Since $$PQ || AC, \angle{PAC}=\angle{QPA}\Rightarrow \angle{PAC}=60^o$$
Now, $$AC,BD$$ are parallel lines $$\Rightarrow AC=BD$$
Also, $$AB,CD$$ are parallel lines $$\Rightarrow AB=CD$$. $$\therefore CD=7\:m$$
Since $$PC \:perpendicular \:to\:AC$$, $$\angle{PDB}=\angle{PCA}=90^o$$
In right triangle $$PBD, tan\:B=\dfrac{PD}{BD}$$
$$\Rightarrow Cot\:45=\dfrac{BD}{PD}$$
$$\Rightarrow 1=\dfrac{BD}{PD}$$
$$\Rightarrow BD=PD \quad ...(1)$$
In right triangle $$PAC, tan\:A=\dfrac{PC}{AC}$$
$$\Rightarrow cot\:60=\dfrac{AC}{PC}$$
$$\Rightarrow \dfrac{1}{\sqrt{3}}=\dfrac{AC}{PC}$$
$$\Rightarrow AC=\dfrac{PC}{\sqrt{3}} $$
$$\Rightarrow BD=\dfrac{PC}{\sqrt{3}} (\because AC=BD) \quad ...(2)$$
From $$(1), (2)$$ we get,
$$PD=\dfrac{PC}{\sqrt{3}}$$
$$\Rightarrow PD=\dfrac{PD+DC}{\sqrt{3}}$$
$$\Rightarrow \sqrt{3}PD=PD+DC$$
$$\Rightarrow (\sqrt{3}-1)PD=7$$
$$\Rightarrow PD=\dfrac{7}{\sqrt{3}-1}$$
Rationalising we get $$PD=\dfrac{7(\sqrt{3}+1)}{3-1}=\dfrac{7(\sqrt{3}+1)}{2}$$
Now, $$PC=PD+DC$$
$$=\dfrac{7(\sqrt{3}+1)}{2}+7$$
$$=\dfrac{7\sqrt{3}+7+14}{2}$$
$$=\dfrac{7\sqrt{3}+21}{2}$$
$$PC=\dfrac{7(\sqrt{3}+3)}{2}$$
Hence the height of the tower is $$\dfrac{7(\sqrt{3}+3)}{2}\: m$$